Set Up Your iOS Development Environment
- The software setup required for iOS development.
- How to check for preinstalled software.
- How to install missing software.
- A Mac OS X development machine.
- Successful completion of step 1, Install Common Components.
iOS development components include:
- iOS SDK
You install Xcode and the iOS SDK as a single unit from the Mac App Store. This package also installs the iOS simulator with recent iPhone and iPad images.
The minimum versions Mobile SDK 7.0 requires are:
- Xcode 10
- iOS 11 SDK
- On your Mac, open the App Store.
- Search the name Xcode.
- Click Get or Update, then, if prompted, click Install App.
- To install, verify, and confirm your installation, follow the prompts.
- When installation finished, click OPEN.
- Accept the Xcode and iOS SDK license agreement.
- To install extra components for building and debugging, follow the prompts.
The Xcode package automatically installs simulator images for recent Apple mobile devices, so you don’t have to set them up.
Good job! Your development environment for Mobile SDK is ready for iOS native app development. If you’d like to install the optional-but-recommended Mobile SDK tool for creating native iOS apps, continue to “Install Forceios”.
For creating compatible iOS apps, Mobile SDK provides forceios, an open-source command-line utility. Forceios is the quickest and easiest way to create native Mobile SDK apps for iOS. You enter some metadata as prompted, and a few minutes later you have a fully configured Xcode project.
To install forceios:
- Open the Terminal app.
- Type sudo npm install -g forceios and press Return.
- When prompted, enter your system password.
To test your installation, type forceios version and press Return.
$ forceios version forceios version 7.0.0
- To get usage information for forceios, type forceios and press Return.
You’ve now installed forceios, but it’s not yet ready to use. To enable forceios, install CocoaPods.
CocoaPods is a third-party dependency manager required by forceios. Forceios uses CocoaPods to import Mobile SDK libraries and their dependencies. Mobile SDK for iOS supports CocoaPods but doesn’t require it.
To enable forceios, install CocoaPods.
To check if it is already installed, type in the Terminal window: pod
- If this command reports version number 1.2 or later, you’re done—proceed to the next installation. If the reported version is earlier than 1.2, continue to step 2.
- If you get a “command not found” error message, continue to step 2.
In the Terminal window, type: sudo gem install cocoapods
If you encounter problems with this installation, consult the documentation at cocoapods.org.
- When the installer finishes, return to step 1.
Good job! Now you can create a Mobile SDK app with forceios, load it into Xcode, and run it in an iOS simulator. You can continue to the Android installation step, if you haven’t done it already, or to the hybrid or React Native installation step.
We won’t check any of your setup. Click Verify Step to continue.