Set Up Your iOS Development Environment
What You’ll Learn
- The software setup required for iOS development.
- How to check for preinstalled software.
- How to install missing software.
- A macOS X development machine.
- Successful completion of step 1, Install Common Components.
About the iOS Development Environment
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 10.0 requires are:
- Xcode 13
- Deployment target: iOS 14 SDK
- Base SDK: iOS 15 SDK
Install Xcode and the iOS 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:
- If this command reports version number 1.8 or higher, you’re done—proceed to the next installation. If the reported version is below this range, 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 -v 1.8If you encounter problems with this installation, consult the documentation at cocoapods.org.
- 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.
sudo npm install -g forceiosand press Return.
- When prompted, enter your system password.
- To verify your installation, type
forceios versionand press Return. For example:
$ forceios version forceios version 10.0.0
- To view usage information for forceios, type
forceiosand 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.