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 8.1 requires are:
- Xcode 11
- iOS 12.2 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 finishes, 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 CocoaPods and forceios.
CocoaPods is a third-party dependency manager required by forceios, a Mobile SDK utility. You need forceios and CocoaPods to earn the Develop with Mobile SDK badge. However, CocoaPods is optional for real-world Mobile SDK development.
To enable forceios, install CocoaPods.
To check if it is already installed, type in the Terminal window: pod
- If this command reports any version number from 1.7.2 to 1.8, you’re done—proceed to the next installation. If the reported version is not in this range, continue to step 2.
- If you get a “command not found” error message, continue to step 2.
In the Terminal window, type:
If you encounter problems with this installation, consult the documentation at cocoapods.org.
sudo gem install cocoapods -v 1.8
- When the installer finishes, return to step 1.
Now that you’ve installed CocoaPods, you’re ready 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 8.1.0
- To get usage information for forceios, type forceios and press Return.
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.