Upgrading existing native iOS applications to IBM MobileFirst Platform Foundation version V7.1.0 manually

You can upgrade your existing native iOS application manually, in Xcode, so that you can work with it in IBM MobileFirst™ Platform Foundation V7.1.0.

Before you begin

  • You must have an existing native iOS project that was created with IBM MobileFirst Platform Foundation 7.0.0 or earlier.
  • You must have already created a new, V7.1.0 or later MobileFirst native API project with MobileFirst Studio or the MobileFirst Platform Command Line Interface so that you can copy certain required files to your Xcode project. For more information, see Creating MobileFirst projects with MobileFirst Studio or the create command.

Procedure

  1. Manually delete the WorklightAPI folder under the main Xcode project folder.
  2. Replace the Worklight.plist file in your Xcode project folder with the Worklight.plist file from your new 7.1 MobileFirst Studio project.
  3. In the Xcode Build Phases tab, Link Binary With Libraries section, remove all references, including the libWorklightStaticLibProjectNative.a reference.
  4. Add the IBM MobileFirst Platform Foundation 7.1 SDK.
    1. Find the WorklightAPI folder in your new IBM MobileFirst Platform Foundation 7.1 or MobileFirst Studio project folder and manually copy it to your main Xcode project folder.
    2. Add the reference to your project: Choose Add Files from the File menu and navigate to the Worklight folder in your Xcode project folder.
  5. In the Search Paths section of the Build Settings tab:
    1. Check that the Header Search Paths values have been removed.
    2. Verify that the Framework Search Paths value is $(PROJECT_DIR)/WorklightAPI/Frameworks.
    3. The Library Search Paths values can also be removed.
  6. If you are using Swift, make sure the $SRCROOT/WorklightAPI/include/WLSwiftBridgingHeader.h has been removed from Swift compiler section in the Build Settings tab (Objective-C Bridging Header ). This header is included in the newly added IBM MobileFirst Platform Foundation 7.1 frameworks in the Build Phases tab, Link Binary With Libraries section
  7. Link the required frameworks, and possibly libraries, and headers in the Build Phases tab, Link Binary With Libraries section:
    1. Make sure the IBM MobileFirst Platform Foundation frameworks have been linked:
      • IBMMobileFirstPlatformFoundation.framework
      Important: If you are using the latest interim fix link the following frameworks:
      • openssl.framework
      • If you want to enable the JSONStore feature (which is optional in the latest interim fix) link these additional files:
        • IBMMobileFirstPlatformFoundationJSONStore
        • SQLCipher.framework

      If the values are set correctly in the Framework Search Paths (see above), the above values should appear in the Link Binary With Libraries.

    2. Add additional required iOS frameworks, dylib files, and libraries (some libraries will already be linked):
      • MobileCoreServices.framework
      • CoreData.framework
      • CoreLocation.framework
      • Security.framework
      • SystemConfiguration.framework
      • libstdc++.dylib
      • libz.dylib
      • libc++.dylib
      Note: From Xcode 7, the *.tbd replace the *.dylib files.
  8. In the Linking section of the Build Settings tab make sure the Other Linker Flags value is set to -ObjC.
  9. In your code import the new MobileFirst framework
    • If you are using Objective C:
      #import <IBMMobileFirstPlatformFoundation/IBMMobileFirstPlatformFoundation.h>
    • If you are using Swift:
      import IBMMobileFirstPlatformFoundation
  10. If you are using IBM MobileFirst Platform Foundation and are using the JSONStore feature, replace all of the existing JSONStore imports of headers with a single entry of the following new umbrella header:

    For Objective C

    #import <IBMMobileFirstPlatformFoundationJSONStore/IBMMobileFirstPlatformFoundationJSONStore.h>

    For Swift

    import IBMMobileFirstPlatformFoundationJSONStore
  11. Beginning with Xcode 7 TLS must be enforced, see Enforcing TLS-secure connections in iOS apps.
  12. From Xcode 7 bitcode is set as a build default and must be disabled. For more information see Disabling bitcode in Xcode builds.

Results

Your application is now upgraded so that it will work with the IBM MobileFirst Platform Foundation, V7.1.0 iOS SDK.