Created
June 7, 2016 17:26
-
-
Save welbesw/ebf5867ca981962ecd03e60492f7ff86 to your computer and use it in GitHub Desktop.
SalesforceManager singleton class
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
import SalesforceSDKCore | |
import SalesforceRestAPI | |
public class SalesforceManager : NSObject { | |
//Define a shared instance for singleton | |
static let sharedInstance = SalesforceManager() | |
let errorDomain = "com.centare.contactforce.salesforcemanager" | |
var consumerKey:String = "" | |
var redirectUrl:String = "" | |
private override init() { | |
super.init() | |
//Perform any setup - load the salesforce configuration | |
SFLogger.setLogLevel(.Debug) | |
consumerKey = "YOUR-CONSUMER-KEY-HERE" //Loaded from Configuration class in my example app | |
redirectUrl = "YOUR-REDIRECT-URL-HERE" //Loaded from Configuration class in my example app | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment