Integrate AirWatch iOS SDK with Room Finder app
In this section, we will include AirWatch SDK framework into Room Finder app.
1. SDK Initial Configuration
1.1. Add the Native Framework using Source Tree
1.2. Native Xcode frameworks
AirWatch iOS SDK is dependent on the following native Xcode frameworks to function properly. To limit the scope of this workshop, these are already added for you.
- Click on "Room Finder" in the left most column.
- Select target "Room Finder" from TARGETS. If you are not seeing this column, please unhide it using the option as hide-unhide tool as per the screenshot.
- Select the option "Build Phases".
- Expand "Link Binary with Libraries". You should see 29 items in the binaries list which are required to run the AirWatch iOS SDK successfully.
The complete list of these frameworks can be found in VMware AirWatch iOS SDK Technical Implementation Guide.
1.3. Valid Architectures
AirWatch iOS SDK currently supports the following architectures: ARMv7, ARMv7S, ARM64. Do not compile the i386 architecture/simulator because the SDK only supports real physical devices.
- Click on "Room Finder" in the left most column.
- Select target "Room Finder" from TARGETS. If you are not seeing this column, please unhide it using the option as hide-unhide tool as per the screenshot.
- Select the option "Build Settings".
- Observe the Valid Architectures as "arm64 armv7 armv7s".
1.4. Linker Flags
2. Add AirWatch SDK Framework
All the AirWatch SDK files are packaged into AirWatchSDK.dmg file. Navigate to the DMG file and extract to view the contents of the file. Next, we will drag and drop the required framework files into the Room Finder project.
2.1. Select SDKLocalization.bundle
2.2. Drag and drop SDK Localization Bundle
2.3. Select AWKit.bundle
2.4. Drag and drop AWKit bundle
2.6. Drag and drop AWSDK.Framework
- Drag and drop AWSDK.framework into the folder "Frameworks" in the sidebar of Xcode.
- Select the Destination option as "Copy items if needed".
- Ensure that Added folder option is selected as "Create groups"
- Ensure that Add to targets option is selected as "RoomFinder".
- Click on "Finish" to import.
Note: Link Binary With Libraries should now have 30 items and you should see AWSDK.framework in the list. If not, click on the "+" sign at the bottom and navigate to AWSDK.framework to add.
2.7. Verify Copy Bundle Resources
In the Xcode project settings,
- Navigate to "Build Phases".
- Expand the option "Copy Bundle Resources"
- Ensure that you can see "SDKLocalization.bundle" and "AWKit.bundle" in the list.
3. Register URL Schemes
In order for the Room Finder app to receive SDK configuration from AirWatch agent, we need to register AirWatch Agent's URL scheme in the info.plist file.
Note: For this workshop, we are using AirWatch agent based enrollment. Hence, AirWatch agent acts as anchor / broker app to authenticate Room Finder app while it fetches the SDK settings.
- From the side panel, expand the folder "RoomFinder".
- Click on "Info.plist".
- Add a new Information Property as "LSApplicationQueriesSchemes" with the type "Array".
3.1. Add AirWatch Agent's URL scheme
3.2. Application's Callback Scheme Registration
Similarly, we also need to register Room Finder applications URL scheme to receive a callback from AirWatch Agent. This step insures that AirWatch agent launches the Room Finder after delivering the SDK configuration successfully.
- Add another Information Property List as "URL types". The type should be auto-selected as "Dictionary".
- After expanding Item 0 of the dictionary, select "URL Schemes". The type should be auto-selected as "Array".
- After expanding Item0 of the array, select type as "String" and value as "roomFinder". Hit return/ enter to continue.
0 Comments
Add your comment