Created
June 7, 2016 17:41
-
-
Save welbesw/b1c9f8619c01a2a9ae74abafde40dcd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setupSDKManager() { | |
let salesforceSDKManager = SalesforceSDKManager.sharedManager() | |
salesforceSDKManager.connectedAppId = self.consumerKey | |
salesforceSDKManager.connectedAppCallbackUri = self.redirectUrl | |
salesforceSDKManager.authScopes = ["web", "api"] | |
//Post launch action handler | |
salesforceSDKManager.postLaunchAction = { launchActionList in | |
let launchActionString = SalesforceSDKManager.launchActionsStringRepresentation(launchActionList) | |
print("postLaunchAction: \(launchActionString)") | |
} | |
//Launch error handler | |
salesforceSDKManager.launchErrorAction = { error, launchActionList in | |
//Log the error | |
print("Error during launch of Salesforce SDK: \(error.localizedDescription)") | |
} | |
//Post logout action | |
salesforceSDKManager.postLogoutAction = { | |
print("SalesforceSDK log out.") | |
//TODO: Reset app state | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment