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
- Manually delete the WorklightAPI folder
under the main Xcode project folder.
- Replace the Worklight.plist file
in your Xcode project folder with the Worklight.plist file
from your new 7.1 MobileFirst Studio project.
- In the Xcode Build Phases tab, Link
Binary With Libraries section, remove all references,
including the libWorklightStaticLibProjectNative.a reference.
- Add the IBM MobileFirst Platform Foundation 7.1
SDK.
- 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.
- Add the reference to your project: Choose Add
Files from the File menu and navigate
to the Worklight folder
in your Xcode project folder.
- In the Search Paths section of
the Build Settings tab:
- Check that the Header Search Paths values
have been removed.
- Verify that the Framework Search Paths value
is $(PROJECT_DIR)/WorklightAPI/Frameworks.
- The Library Search Paths values
can also be removed.
- 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
- Link the required frameworks, and possibly libraries, and
headers in the Build Phases tab, Link
Binary With Libraries section:
- 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.
- 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.
- In the Linking section of the Build
Settings tab make sure the Other Linker Flags value
is set to -ObjC.
- 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
- 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
- Beginning with Xcode 7 TLS must be enforced, see Enforcing TLS-secure connections in iOS apps.
- 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.