Configuring a Swift application

Because Apple Swift is compatible with Objective-C, you can use the MobileFirst API from within an iOS Swift project.

Procedure

  1. Create a Swift project and install the MobileFirst SDK into an iOS native application as explained in Installing required components.
  2. Use the import IBMMobileFirstPlatformFoundation statement in any class that needs to use the MobileFirst SDK.

Results

All the MobileFirst classes are now available from any of your Swift files. The Xcode IDE provides code autocompletion, converted to the Swift style.

What to do next

A tutorial is available on the Developer Center. See Configuring a native iOS application with the MobileFirst Platform SDK.