- In Xcode, create a new iOS Project (Single View Application). When prompted for options, select Swift in the Language drop-down.
Create a Header File and name it
<PROJECT_NAME>-Bridging-Header.h. Make sure the main project's application target folder is selected, then from the menu, select File > New > File... or drag a Header File from the File Template library to the application target folder. The application target folder is a folder under the root project folder and will be named the same as the project if the name has not been changed.
- Unzip the
appcelerator-sdk-ios-<VERSION>.zipfile and drag the
Appcelerator.frameworkfolder into the root project folder.
- Select Copy items into destination… and click Finish.
- Select your project in the Project Navigator and click the Build Phases tab.
- Expand the Link Binary With Libraries section and add the
libz.tbdframeworks. Before Xcode 7, the framework extension is
- Click the Build Settings tab, then click the All button in the top-left corner of the tab.
- If you are using Xcode 7, you will need to disable bit code since some third-party libraries do not have bit code enabled. Expand the Build Options section and set Enable Bitcode to No.
- Expand the Linking section and add
-ObjCto Other Linker Flags.
Expand the Swift Compiler - Code Generation section (near the bottom) and add the bridging header file (with the relative path from the root folder) to Objective-C Bridging Header, for example, <
Open the bridging header file and add the following import statement:
Open the application delegate file (
AppDelegate.swift) and add the following initialization code to the
The iOS application is now ready to make method calls using the APS SDK APIs.