diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-07-08 20:36:55 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-07-08 20:37:41 -0700 |
commit | 89801946f05774d3037b15f11b6a5d249c776804 (patch) | |
tree | 7d3b7512a11ae45bb9573811e784f44a4ead84cd /example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m | |
parent | 9c721bbf410e2064a6fb69f8b1249fd785d1c275 (diff) |
Added OAuth 2.0 support to examples
Diffstat (limited to 'example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m')
-rw-r--r-- | example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m index e2f0d2c5..d17b479a 100644 --- a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m +++ b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m @@ -13,6 +13,7 @@ NSString * const UsernameKey = @"username"; NSString * const PasswordKey = @"password"; NSString * const HostnameKey = @"hostname"; NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; +NSString * const OAuthEnabledKey = @"OAuth2Enabled"; @implementation SettingsViewController @@ -21,6 +22,7 @@ NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; [[FXKeychain defaultKeychain] setObject:self.passwordTextField.text ?: @"" forKey:PasswordKey]; [[NSUserDefaults standardUserDefaults] setObject:self.hostnameTextField.text ?: @"" forKey:HostnameKey]; [[NSUserDefaults standardUserDefaults] setBool:[self.fetchFullMessageSwitch isOn] forKey:FetchFullMessageKey]; + [[NSUserDefaults standardUserDefaults] setBool:[self.useOAuth2Switch isOn] forKey:OAuthEnabledKey]; [self.delegate settingsViewControllerFinished:self]; } @@ -33,6 +35,7 @@ NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; self.passwordTextField.text = [[FXKeychain defaultKeychain] objectForKey:PasswordKey]; self.hostnameTextField.text = [[NSUserDefaults standardUserDefaults] stringForKey:HostnameKey]; self.fetchFullMessageSwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:FetchFullMessageKey]; + self.useOAuth2Switch.on = [[NSUserDefaults standardUserDefaults] boolForKey:OAuthEnabledKey]; } @end |