Created
October 23, 2015 06:45
-
-
Save cosbor11/758211a70a0e53837ee7 to your computer and use it in GitHub Desktop.
AppDelegate configuration for PersistenceManagerAPI
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
| @interface AppDelegate () | |
| @property (nonatomic, strong) SWGPersistenceManagerApi* persistenceManager; | |
| @end | |
| @implementation AppDelegate | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
| // Get the configuration and set the credentials, and endpoint | |
| SWGConfiguration *config = [SWGConfiguration sharedConfig]; | |
| [config setUsername:@"admin"]; | |
| [config setPassword:@"admin"]; | |
| [config setHost:@"http://localhost:8080/web"]; | |
| // Create a persistence manager with credentials | |
| self.persistenceManager = [SWGPersistenceManagerApi apiWithHeader:[config getBasicAuthToken] key:@"Authorization"]; | |
| // Override point for customization after application launch. | |
| return YES; | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment