+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Set up the Xcode project for iOS manually

We can add MobileFirst functionality to our existing or new Xcode project. The required framework and library files can be generated by IBM MobileFirstâ„¢ Platform Foundation by using IBM MobileFirst Platform Operations Console and added to our Xcode project. The Xcode project must be then configured correctly according to our development goals.


Before you begin

You must have:


Procedure

  1. In your Xcode project, add the MobileFirst framework files to our project.

    1. Select the project root icon in the project explorer.
    2. Select File > Add Files and navigate to the folder that contains the framework files created by IBM MobileFirst Platform Operations Console.
    3. Click the Options button.
    4. Select Copy items if needed and Create groups for any added folders.

      Note: If you do not select the Copy items if needed option, the framework files are not copied but are linked from their original location.

    5. Select the main project (first option) and select the app target.
    6. In the General tab, remove any frameworks that would get added automatically to Linked Frameworks and Libraries.
    7. Required: In Embedded Binaries, add the following frameworks:

      • IBMMobileFirstPlatformFoundation.framework
      • IBMMobileFirstPlatformFoundationOpenSSLUtils.framework
      • IBMMobileFirstPlatformFoundationWatchOS.framework
      • Localizations.bundle

      Performing this step would automatically add these frameworks to Linked Frameworks and Libraries.

    8. In Linked Frameworks and Libraries, add the following frameworks:

      • IBMMobileFirstPlatformFoundationJSONStore.framework
      • sqlcipher.framework
      • openssl.framework

    9. Similarly, add optional frameworks. For more information about available frameworks, see Add optional frameworks manually.

      Note: These steps copy the relevant MobileFirst frameworks to our project and link them within the Link Binary with Libraries list in the Build Phases tab. If you link the files to their original location (without choosing the Copy items if needed option as described previously), you need to set the Framework Search Paths as described below.

  2. The frameworks added in Step 1, would be automatically added to the Link Binary with Libraries section, in the Build Phases tab.
  3. Optional: If you did not copy the framework files into the project as described previously , perform the following steps by using the Copy items if needed option, in the Build Phases tab.

    1. Open the Build Settings page.
    2. Find the Search Paths section.
    3. Add the path of the folder that contains the frameworks to the Framework Search Paths folder.
  4. In the Deployment section of the Build Settings tab, select a value for the iOS Deployment Target field that is greater than or equal to 8.0.
  5. Optional: From Xcode 7, bitcode is set as the default. For limitations and requirements see Work with bitcode in iOS apps. To disable bitcode:

    1. Open the Build Options section.
    2. Set Enable Bitcode to No.
  6. Beginning with Xcode 7, TLS must be enforced.

    See Enforcing TLS-secure connections in iOS apps.


Results

Your Xcode project is now ready for development.

You must import the headers for the IBMMobileFirstPlatformFoundation framework:


What to do next

Before we can access server resources, we must register your app. See Register iOS applications from the MobileFirst Platform CLI. For details about the mfpclient.plist file see iOS client properties file.

Parent topic: Methods of setting up your environment