Install the SDK in an environment without a previous version of the SDK.

For details on how to expose a custom scheme for the call back scheme using the AirWatch Agent for iOS, see Expose a Custom Scheme To Use in a Callback Scheme.

  1. Unzip the AirWatchSDK DMG file.
  2. Drag and drop the current AirWatchSDK framework file and the attached AWCMWrapper file into your Embedded Binaries step in the build phase section of your project settings.

    Do not add the framework files to only the Link Binary with Libraries because this actions causes the application to crash. When you add it to the Embedded Binaries, this action automatically adds the file to the Link Binary with Libraries, too.

  3. Register your callback scheme.
  4. Import the AWSDK module.

  5. Make your AppDelegate conform to the AWControllerDelegate protocol.

                            	import AWSDK
                            	class AppDelegate: UIResponder, UIApplicationDelegate,
                            		  AWSDKDelegate {
  6. In the AppDelegate, add the following code to initialize and start the SDK.

    Do not call the start method in applicationWillEnterForeground or applicationDidBecomeActive. These start methods result in inconsistent UI behavior.

                            	func application(_ application: UIApplication,
                            didFinishLaunchingWithOptions launchOptions:
                            [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
                            	let awcontroller = AWController.clientInstance()
                            awcontroller.callbackScheme = "myCallbackScheme"
                            return true
  7. Implement the required delegate method controllerDidFinishInitialCheck.

    	func controllerDidFinishInitialCheck(error: NSError?) {
                            	if error != nil {
                            AWLogError("Initial Check Done Error: \(error)")
                            AWLogInfo("SDK Initial Check Done!")

You can add optional delegate methods that are described in Required and Optional AWController Delegate Callback Methods.