For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Develop native applications for iOS in Xcode
To create an IBM MobileFirstâ„¢ Platform Foundation app, we must set up the IBM MobileFirst Platform Foundation SDK and configuration files, and add them to our iOS Xcode project. Then we can start to develop your app.
Note: MobileFirst development is supported in Xcode from version 7.1 by using iOS 8.0 and later.
To develop a native iOS application, we must add the MobileFirst framework files to our Xcode project and register the app on the IBM MobileFirst Platform Server. See Register iOS applications to MobileFirst Server.
Note: Configuration and setup guidelines are provided for both Swift and Objective-C Xcode projects. We can find many Swift code examples in the Developer Center Tutorials.
We can add the MobileFirst frameworks to our Xcode project in one of the following ways:
- Obtaining a set of MobileFirst framework files and manually copying them to our Xcode project. See Set up the Xcode project for iOS manually.
- Using CocoaPods. See Add MobileFirst SDK to an iOS Xcode project using CocoaPods.
The following topics show you how to set up an initial project and start developing.
- Methods of setting up your environment
We can prepare your environment for developing MobileFirst applications in either of two ways: by copying the MobileFirst frameworks to our Xcode project or by installing the files using CocoaPods.- Add optional iOS frameworks
MobileFirst iOS functionality is provided by a collection of frameworks that can be added to our app. Only one of these frameworks is required (IBMMobileFirstPlatformFoundation). We can add optional frameworks according to the features we want to implement in your app. You reduce the size of the app by including only the frameworks required by your chosen features.- Register iOS applications to MobileFirst Server
Register your iOS application to an instance of MobileFirst Server to establish communication with the server and to provide the server with information about your app. We can register your app by using the IBM MobileFirst Platform Command Line Interface (CLI) or the IBM MobileFirst Platform Operations Console.- iOS client properties file
The mfpclient.plist file defines the client-side properties used for registering your iOS app on the MobileFirst server.- Create some initial code in iOS
A simple startup process for iOS is described here with short samples for both Objective C and Swift. Before trying the sample, make sure you have imported the frameworks and added the necessary imports.- Using Logger in Swift projects
In order to use OCLogger in Swift projects, we can configure your Swift application by following the steps described in this section.- Enforcing TLS-secure connections in iOS apps
From iOS 9, Transport Layer Security (TLS) protocol version 1.2 must be enforced in all apps. We can disable this protocol and bypass the iOS 9 requirement for development purposes.- Enabling OpenSSL for iOS
The MobileFirst iOS SDK uses native iOS APIs for cryptography. We can configure the IBM MobileFirst Platform Foundation V8.0.0 to use the OpenSSL cryptography library in iOS apps.- Work with bitcode in iOS apps
Starting with Xcode 7, bitcode is supported and enabled by default for all new projects.- Develop for watchOS 2
We can develop your watchOS 2 app with MobileFirst by setting the correct frameworks, libraries, and build settings in Xcode.
Parent topic: Develop the client side of a MobileFirst application