If you migrate an older version of the SDK to install it, review the list of changed components. Update names and locations of components to prevent or resolve build errors caused by the differences between SDK versions.

Samples present the old version of the code followed by the current code.

Table 1. Workspace ONE SDK for iOS (Swift) Components with Examples of Objective-C and Swift Code

Component

Sample Code

AWController start

In the previous SDK you called awcontroller.start() within the applicationDidBecomeActive method.

In the current SDK, start the SDK within the didFinishLaunchingWithOptions method inside your application delegate class.

You will get inconsistent UI behaviors from the SDK if you do not make this change.

	///5.9.X Implementation
	func applicationDidBecomeActive(_ application: UIApplication) 
    	let awc = AWController.clientInstance()
    	awc.delegate = self
    	awc.callbackScheme = "myAppName"
		awc.start()
	}
	///Swift version Implementation
	func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    	let awc = AWController.clientInstance()
    	awc.delegate = self
    	awc.callbackScheme = "myAppName"
    	awc.start()
    	return true
    }

CanhandleProtectionSpace (Integrated Authentication)

Update the code for authentication challenges and chain validation.

	///5.9.X Implementation
	try AWController.clientInstance().canHandle(challenge.protectionsSpace)
	///Swift version Implementation
	try AWController.clientInstance().canHandle(protectionsSpace: challenge.protectionsSpace )

AWLog singleton (Logging)

Use this instead of the AWController to send logs.

	///5.9.X Implementation
	AWLog.sharedInstance().sendApplicationLogs(success, errorName)
	///Swift version Implementation
	AWController.clientInstance().sendLogDataWithCompletion { (success, error)
	}

Network status

Update the front of the enum to AWSDK.

	///5.9.X Implementation
	AWNetworkActivityStatus

	///Swift version Implementation
	AWSDK.NetworkActivityStatus

Profiles and profile payloads

Drop the AW from the front of profiles.

	///5.9.X Implementation
	AWProfile
	///Swift version Implementation
	Profile

Custom settings

Access custom settings through AWController instead of AWCommanManager.

	///5.9.X Implementation
	AWCommandManager().sdkProfile().customPayload
	///Swift version Implementation
	AWController.clientInstance().sdkProfile()?.customPayload

Account object

The account object is now a property on AWController instead of an accessor method.

This property returns default, empty values for SAML and token enrollment.

	///5.9.X Implementation
	AWController.clientInstance().account()
	///Swift version Implementation
	AWController.clientInstance().account

User credentials

	///5.9.X Implementation
	AWController.clientInstance().updateUserCredentials(completions: 	{ (success, error) in {
		...
	} )
	///Swift version Implementation
	AWController.clientInstance().updateUserCredentials(with:	{ (success, error) in {
		...
	})

OpenInURL calls

	///5.9.X Implementation
	AWController.clientInstance().handleOpen(url,
					fromApplication: sourceApplication)
	///Swift version Implementation
	AWController.clientInstance().handleOpenURL(url,
					fromApplication: sourceApplication)

DeviceInformationController

Replace MDMInformationController with DeviceInformationController.

NA

Manually load commands

Use an API on AWController to force commands to reload instead of using the command manager.

	///5.9.X Implementation
	AWCommandHandler.sharedHandler().loadCommands()
	///Swift version Implementation
	AWController.clientInstance().loadCommands()