aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/ios
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-08 20:36:55 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-08 20:37:41 -0700
commit89801946f05774d3037b15f11b6a5d249c776804 (patch)
tree7d3b7512a11ae45bb9573811e784f44a4ead84cd /example/ios
parent9c721bbf410e2064a6fb69f8b1249fd785d1c275 (diff)
Added OAuth 2.0 support to examples
Diffstat (limited to 'example/ios')
-rw-r--r--example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj71
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/MasterViewController.m77
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/SettingsViewController.h3
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m3
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/SettingsViewController.xib283
5 files changed, 405 insertions, 32 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj
index db280fde..e9cd3797 100644
--- a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj
+++ b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj
@@ -28,6 +28,13 @@
ABE4026B173F3FCE007F1FB3 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABE4026A173F3FCE007F1FB3 /* ImageIO.framework */; };
B12AAA3417322654003551C7 /* MCOMessageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B12AAA3017322654003551C7 /* MCOMessageView.mm */; };
B12AAA3517322654003551C7 /* MCTMsgViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = B12AAA3217322654003551C7 /* MCTMsgViewController.mm */; };
+ C6D7194D178BB8B4008ED15F /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D71939178BA812008ED15F /* GTMHTTPFetcher.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C6D7194E178BB8B4008ED15F /* GTMHTTPFetchHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D7193B178BA812008ED15F /* GTMHTTPFetchHistory.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C6D7194F178BB8B4008ED15F /* GTMOAuth2Authentication.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D7193E178BA812008ED15F /* GTMOAuth2Authentication.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C6D71950178BB8B4008ED15F /* GTMOAuth2SignIn.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D71940178BA812008ED15F /* GTMOAuth2SignIn.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C6D71951178BB8B4008ED15F /* GTMOAuth2ViewControllerTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D71947178BA812008ED15F /* GTMOAuth2ViewControllerTouch.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ C6D71952178BB8B4008ED15F /* GTMOAuth2ViewTouch.xib in Resources */ = {isa = PBXBuildFile; fileRef = C6D71948178BA812008ED15F /* GTMOAuth2ViewTouch.xib */; };
+ C6D71954178BB91E008ED15F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6D71953178BB91E008ED15F /* SystemConfiguration.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -107,6 +114,18 @@
B12AAA3017322654003551C7 /* MCOMessageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOMessageView.mm; sourceTree = "<group>"; };
B12AAA3117322654003551C7 /* MCTMsgViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCTMsgViewController.h; sourceTree = "<group>"; };
B12AAA3217322654003551C7 /* MCTMsgViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCTMsgViewController.mm; sourceTree = "<group>"; };
+ C6D71938178BA812008ED15F /* GTMHTTPFetcher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetcher.h; sourceTree = "<group>"; };
+ C6D71939178BA812008ED15F /* GTMHTTPFetcher.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetcher.m; sourceTree = "<group>"; };
+ C6D7193A178BA812008ED15F /* GTMHTTPFetchHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTMHTTPFetchHistory.h; sourceTree = "<group>"; };
+ C6D7193B178BA812008ED15F /* GTMHTTPFetchHistory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPFetchHistory.m; sourceTree = "<group>"; };
+ C6D7193D178BA812008ED15F /* GTMOAuth2Authentication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2Authentication.h; sourceTree = "<group>"; };
+ C6D7193E178BA812008ED15F /* GTMOAuth2Authentication.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2Authentication.m; sourceTree = "<group>"; };
+ C6D7193F178BA812008ED15F /* GTMOAuth2SignIn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2SignIn.h; sourceTree = "<group>"; };
+ C6D71940178BA812008ED15F /* GTMOAuth2SignIn.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2SignIn.m; sourceTree = "<group>"; };
+ C6D71946178BA812008ED15F /* GTMOAuth2ViewControllerTouch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GTMOAuth2ViewControllerTouch.h; sourceTree = "<group>"; };
+ C6D71947178BA812008ED15F /* GTMOAuth2ViewControllerTouch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GTMOAuth2ViewControllerTouch.m; sourceTree = "<group>"; };
+ C6D71948178BA812008ED15F /* GTMOAuth2ViewTouch.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GTMOAuth2ViewTouch.xib; sourceTree = "<group>"; };
+ C6D71953178BB91E008ED15F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -114,6 +133,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ C6D71954178BB91E008ED15F /* SystemConfiguration.framework in Frameworks */,
AB7BA446171389CC00104953 /* libMailCore-ios.a in Frameworks */,
ABE4026B173F3FCE007F1FB3 /* ImageIO.framework in Frameworks */,
AB9EAE40170374D900D750C7 /* Security.framework in Frameworks */,
@@ -170,6 +190,7 @@
AB9EAE04170368F000D750C7 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ C6D71953178BB91E008ED15F /* SystemConfiguration.framework */,
ABE4026A173F3FCE007F1FB3 /* ImageIO.framework */,
AB7BA4471713913F00104953 /* CFNetwork.framework */,
AB9EAE3F170374D900D750C7 /* Security.framework */,
@@ -183,6 +204,7 @@
AB9EAE0B170368F000D750C7 /* iOS UI Test */ = {
isa = PBXGroup;
children = (
+ C6D71936178BA812008ED15F /* gtm-oauth2 */,
AB7BA4321713898B00104953 /* mailcore2.xcodeproj */,
AB9EAE11170368F000D750C7 /* main.mm */,
AB9EAE14170368F000D750C7 /* AppDelegate.h */,
@@ -217,6 +239,49 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ C6D71936178BA812008ED15F /* gtm-oauth2 */ = {
+ isa = PBXGroup;
+ children = (
+ C6D71937178BA812008ED15F /* HTTPFetcher */,
+ C6D7193C178BA812008ED15F /* Source */,
+ );
+ name = "gtm-oauth2";
+ path = "../../../common/gtm-oauth2";
+ sourceTree = "<group>";
+ };
+ C6D71937178BA812008ED15F /* HTTPFetcher */ = {
+ isa = PBXGroup;
+ children = (
+ C6D71938178BA812008ED15F /* GTMHTTPFetcher.h */,
+ C6D71939178BA812008ED15F /* GTMHTTPFetcher.m */,
+ C6D7193A178BA812008ED15F /* GTMHTTPFetchHistory.h */,
+ C6D7193B178BA812008ED15F /* GTMHTTPFetchHistory.m */,
+ );
+ path = HTTPFetcher;
+ sourceTree = "<group>";
+ };
+ C6D7193C178BA812008ED15F /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ C6D7193D178BA812008ED15F /* GTMOAuth2Authentication.h */,
+ C6D7193E178BA812008ED15F /* GTMOAuth2Authentication.m */,
+ C6D7193F178BA812008ED15F /* GTMOAuth2SignIn.h */,
+ C6D71940178BA812008ED15F /* GTMOAuth2SignIn.m */,
+ C6D71945178BA812008ED15F /* Touch */,
+ );
+ path = Source;
+ sourceTree = "<group>";
+ };
+ C6D71945178BA812008ED15F /* Touch */ = {
+ isa = PBXGroup;
+ children = (
+ C6D71946178BA812008ED15F /* GTMOAuth2ViewControllerTouch.h */,
+ C6D71947178BA812008ED15F /* GTMOAuth2ViewControllerTouch.m */,
+ C6D71948178BA812008ED15F /* GTMOAuth2ViewTouch.xib */,
+ );
+ path = Touch;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -313,6 +378,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ C6D71952178BB8B4008ED15F /* GTMOAuth2ViewTouch.xib in Resources */,
ABE40269173F0282007F1FB3 /* MCOMessageViewScript.js in Resources */,
AB9EAE10170368F000D750C7 /* InfoPlist.strings in Resources */,
AB9EAE18170368F000D750C7 /* Default.png in Resources */,
@@ -331,10 +397,15 @@
buildActionMask = 2147483647;
files = (
AB9EAE12170368F000D750C7 /* main.mm in Sources */,
+ C6D7194E178BB8B4008ED15F /* GTMHTTPFetchHistory.m in Sources */,
AB9EAE16170368F000D750C7 /* AppDelegate.m in Sources */,
AB9EAE22170368F000D750C7 /* MasterViewController.m in Sources */,
AB9EAE3617036FD700D750C7 /* SettingsViewController.m in Sources */,
+ C6D7194D178BB8B4008ED15F /* GTMHTTPFetcher.m in Sources */,
+ C6D71951178BB8B4008ED15F /* GTMOAuth2ViewControllerTouch.m in Sources */,
AB665BCD17134336007F2151 /* FXKeychain.m in Sources */,
+ C6D71950178BB8B4008ED15F /* GTMOAuth2SignIn.m in Sources */,
+ C6D7194F178BB8B4008ED15F /* GTMOAuth2Authentication.m in Sources */,
B12AAA3417322654003551C7 /* MCOMessageView.mm in Sources */,
B12AAA3517322654003551C7 /* MCTMsgViewController.mm in Sources */,
);
diff --git a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
index 3e5e4422..5bbc0d53 100644
--- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
+++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m
@@ -10,6 +10,11 @@
#import <MailCore/MailCore.h>
#import "FXKeychain.h"
#import "MCTMsgViewController.h"
+#import "GTMOAuth2ViewControllerTouch.h"
+
+#define CLIENT_ID @"the-client-id"
+#define CLIENT_SECRET @"the-client-secret"
+#define KEYCHAIN_ITEM_NAME @"MailCore OAuth 2.0 Token"
@interface MasterViewController ()
@property (nonatomic, strong) NSArray *messages;
@@ -26,24 +31,78 @@
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ HostnameKey: @"imap.gmail.com" }];
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"OAuth2Enabled"]) {
+ [self startOAuth2];
+ }
+ else {
+ [self startLogin];
+ }
+}
+
+- (void) startLogin
+{
NSString *username = [[NSUserDefaults standardUserDefaults] objectForKey:UsernameKey];
NSString *password = [[FXKeychain defaultKeychain] objectForKey:PasswordKey];
NSString *hostname = [[NSUserDefaults standardUserDefaults] objectForKey:HostnameKey];
-
- [self loadAccountWithUsername:username password:password hostname:hostname];
+
+ if (!username.length || !password.length) {
+ [self performSelector:@selector(showSettingsViewController:) withObject:nil afterDelay:0.5];
+ return;
+ }
+
+ [self loadAccountWithUsername:username password:password hostname:hostname oauth2Token:nil];
}
-- (void)loadAccountWithUsername:(NSString *)username password:(NSString *)password hostname:(NSString *)hostname {
- if (!username.length || !password.length) {
- [self performSelector:@selector(showSettingsViewController:) withObject:nil afterDelay:0.5];
- return;
- }
-
+- (void) startOAuth2
+{
+ GTMOAuth2Authentication * auth = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:KEYCHAIN_ITEM_NAME
+ clientID:CLIENT_ID
+ clientSecret:CLIENT_SECRET];
+
+ if ([auth refreshToken] == nil) {
+ MasterViewController * __weak weakSelf = self;
+ GTMOAuth2ViewControllerTouch *viewController = [GTMOAuth2ViewControllerTouch controllerWithScope:@"https://mail.google.com/"
+ clientID:CLIENT_ID
+ clientSecret:CLIENT_SECRET
+ keychainItemName:KEYCHAIN_ITEM_NAME
+ completionHandler:^(GTMOAuth2ViewControllerTouch *viewController, GTMOAuth2Authentication *retrievedAuth, NSError *error) {
+ [weakSelf loadWithAuth:retrievedAuth];
+ }];
+ [self.navigationController pushViewController:viewController
+ animated:YES];
+ }
+ else {
+ [auth beginTokenFetchWithDelegate:self
+ didFinishSelector:@selector(auth:finishedRefreshWithFetcher:error:)];
+ }
+}
+
+- (void)auth:(GTMOAuth2Authentication *)auth
+finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher
+ error:(NSError *)error {
+ [self loadWithAuth:auth];
+}
+
+- (void)loadWithAuth:(GTMOAuth2Authentication *)auth
+{
+ NSString *hostname = [[NSUserDefaults standardUserDefaults] objectForKey:HostnameKey];
+ [self loadAccountWithUsername:[auth userEmail] password:nil hostname:hostname oauth2Token:[auth accessToken]];
+}
+
+- (void)loadAccountWithUsername:(NSString *)username
+ password:(NSString *)password
+ hostname:(NSString *)hostname
+ oauth2Token:(NSString *)oauth2Token
+{
self.imapSession = [[MCOIMAPSession alloc] init];
self.imapSession.hostname = hostname;
self.imapSession.port = 993;
self.imapSession.username = username;
self.imapSession.password = password;
+ if (oauth2Token != nil) {
+ self.imapSession.OAuth2Token = oauth2Token;
+ self.imapSession.authType = MCOAuthTypeXOAuth2;
+ }
self.imapSession.connectionType = MCOConnectionTypeTLS;
MasterViewController * __weak weakSelf = self;
self.imapSession.connectionLogger = ^(void * connectionID, MCOConnectionLogType type, NSData * data) {
@@ -135,7 +194,7 @@
![password isEqualToString:self.imapSession.password] ||
![hostname isEqualToString:self.imapSession.hostname]) {
self.imapSession = nil;
- [self loadAccountWithUsername:username password:password hostname:hostname];
+ [self loadAccountWithUsername:username password:password hostname:hostname oauth2Token:nil];
}
}
diff --git a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.h b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.h
index e5f5da48..a1cb84a2 100644
--- a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.h
+++ b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.h
@@ -12,6 +12,7 @@ extern NSString * const UsernameKey;
extern NSString * const PasswordKey;
extern NSString * const HostnameKey;
extern NSString * const FetchFullMessageKey;
+extern NSString * const OAuthEnabledKey;
@protocol SettingsViewControllerDelegate;
@@ -21,6 +22,8 @@ extern NSString * const FetchFullMessageKey;
@property (weak, nonatomic) IBOutlet UITextField *passwordTextField;
@property (weak, nonatomic) IBOutlet UITextField *hostnameTextField;
@property (weak, nonatomic) IBOutlet UISwitch *fetchFullMessageSwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *useOAuth2Switch;
+
@property (nonatomic, weak) id<SettingsViewControllerDelegate> delegate;
- (IBAction)done:(id)sender;
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
diff --git a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.xib b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.xib
index 3de561bd..c3f4f089 100644
--- a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.xib
+++ b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.xib
@@ -3,12 +3,12 @@
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12E55</string>
- <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.InterfaceBuilderVersion">4457.6</string>
<string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">2083</string>
+ <string key="NS.object.0">3682.6</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBNSLayoutConstraint</string>
@@ -96,8 +96,8 @@
<int key="type">1</int>
<double key="pointSize">14</double>
</object>
- <object class="NSFont" key="IBUIFont" id="649714166">
- <string key="NSName">Helvetica</string>
+ <object class="NSFont" key="IBUIFont" id="577736679">
+ <string key="NSName">HelveticaNeue</string>
<double key="NSSize">14</double>
<int key="NSfFlags">16</int>
</object>
@@ -130,7 +130,7 @@
</object>
<int key="IBUIClearButtonMode">1</int>
<reference key="IBUIFontDescription" ref="985700861"/>
- <reference key="IBUIFont" ref="649714166"/>
+ <reference key="IBUIFont" ref="577736679"/>
</object>
<object class="IBUITextField" id="394260873">
<reference key="NSNextResponder" ref="191373211"/>
@@ -159,7 +159,7 @@
</object>
<int key="IBUIClearButtonMode">1</int>
<reference key="IBUIFontDescription" ref="985700861"/>
- <reference key="IBUIFont" ref="649714166"/>
+ <reference key="IBUIFont" ref="577736679"/>
</object>
<object class="IBUISwitch" id="348875194">
<reference key="NSNextResponder" ref="191373211"/>
@@ -167,7 +167,7 @@
<string key="NSFrame">{{208, 180}, {94, 27}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
+ <reference key="NSNextKeyView" ref="780270730"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -188,7 +188,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Fetch full message</string>
- <object class="NSColor" key="IBUITextColor">
+ <object class="NSColor" key="IBUITextColor" id="471454649">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
@@ -196,7 +196,41 @@
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<reference key="IBUIFontDescription" ref="985700861"/>
- <reference key="IBUIFont" ref="649714166"/>
+ <reference key="IBUIFont" ref="577736679"/>
+ <bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+ </object>
+ <object class="IBUISwitch" id="480060909">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{208, 215}, {94, 27}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ </object>
+ <object class="IBUILabel" id="780270730">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 218}, {143, 21}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="480060909"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Use OAuth 2.0</string>
+ <reference key="IBUITextColor" ref="471454649"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <reference key="IBUIFontDescription" ref="985700861"/>
+ <reference key="IBUIFont" ref="577736679"/>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
</array>
@@ -272,6 +306,14 @@
<int key="connectionID">69</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">useOAuth2Switch</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="480060909"/>
+ </object>
+ <int key="connectionID">84</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">done:</string>
<reference key="source" ref="38144743"/>
@@ -292,6 +334,57 @@
<int key="objectID">1</int>
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
+ <object class="IBNSLayoutConstraint" id="728173208">
+ <reference key="firstItem" ref="480060909"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="348875194"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="191373211"/>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <bool key="placeholder">NO</bool>
+ </object>
+ <object class="IBNSLayoutConstraint" id="390655325">
+ <reference key="firstItem" ref="480060909"/>
+ <int key="firstAttribute">3</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="348875194"/>
+ <int key="secondAttribute">4</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">8</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="191373211"/>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
+ </object>
+ <object class="IBNSLayoutConstraint" id="999557578">
+ <reference key="firstItem" ref="480060909"/>
+ <int key="firstAttribute">10</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="780270730"/>
+ <int key="secondAttribute">10</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="191373211"/>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <bool key="placeholder">NO</bool>
+ </object>
<object class="IBNSLayoutConstraint" id="148058045">
<reference key="firstItem" ref="348875194"/>
<int key="firstAttribute">3</int>
@@ -307,6 +400,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="719571487">
<reference key="firstItem" ref="191373211"/>
@@ -320,9 +414,44 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
+ </object>
+ <object class="IBNSLayoutConstraint" id="247680247">
+ <reference key="firstItem" ref="780270730"/>
+ <int key="firstAttribute">6</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="484795553"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="191373211"/>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <bool key="placeholder">NO</bool>
+ </object>
+ <object class="IBNSLayoutConstraint" id="986729151">
+ <reference key="firstItem" ref="780270730"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="484795553"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="191373211"/>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="918242346">
<reference key="firstItem" ref="484795553"/>
@@ -339,6 +468,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="342906512">
<reference key="firstItem" ref="484795553"/>
@@ -352,9 +482,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="1036238214">
<reference key="firstItem" ref="191373211"/>
@@ -368,9 +499,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="662191761">
<reference key="firstItem" ref="394260873"/>
@@ -384,9 +516,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="457196062">
<reference key="firstItem" ref="394260873"/>
@@ -403,6 +536,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="295413753">
<reference key="firstItem" ref="923634912"/>
@@ -419,6 +553,7 @@
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="144109937">
<reference key="firstItem" ref="191373211"/>
@@ -432,9 +567,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="620844127">
<reference key="firstItem" ref="923634912"/>
@@ -448,9 +584,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="321610222">
<reference key="firstItem" ref="191373211"/>
@@ -464,9 +601,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="126503603">
<reference key="firstItem" ref="339913914"/>
@@ -483,6 +621,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="17620276">
<reference key="firstItem" ref="339913914"/>
@@ -496,9 +635,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="118803530">
<reference key="firstItem" ref="703582545"/>
@@ -512,9 +652,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="7756024">
<reference key="firstItem" ref="703582545"/>
@@ -528,9 +669,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="630587606">
<reference key="firstItem" ref="703582545"/>
@@ -544,9 +686,10 @@
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
- <int key="scoringType">8</int>
+ <int key="scoringType">0</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
+ <bool key="placeholder">NO</bool>
</object>
<reference ref="703582545"/>
<reference ref="339913914"/>
@@ -554,6 +697,8 @@
<reference ref="394260873"/>
<reference ref="348875194"/>
<reference ref="484795553"/>
+ <reference ref="480060909"/>
+ <reference ref="780270730"/>
</array>
<reference key="parent" ref="0"/>
</object>
@@ -699,6 +844,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
+ <bool key="placeholder">NO</bool>
</object>
<object class="IBNSLayoutConstraint" id="670227139">
<reference key="firstItem" ref="484795553"/>
@@ -715,6 +861,7 @@
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
+ <bool key="placeholder">NO</bool>
</object>
</array>
<reference key="parent" ref="191373211"/>
@@ -739,6 +886,65 @@
<reference key="object" ref="269062633"/>
<reference key="parent" ref="484795553"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">72</int>
+ <reference key="object" ref="480060909"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">73</int>
+ <reference key="object" ref="780270730"/>
+ <array class="NSMutableArray" key="children">
+ <object class="IBNSLayoutConstraint" id="725298023">
+ <reference key="firstItem" ref="780270730"/>
+ <int key="firstAttribute">8</int>
+ <int key="relation">0</int>
+ <nil key="secondItem"/>
+ <int key="secondAttribute">0</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">21</double>
+ </object>
+ <float key="priority">1000</float>
+ <reference key="containingView" ref="780270730"/>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">1</int>
+ <bool key="placeholder">NO</bool>
+ </object>
+ </array>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">75</int>
+ <reference key="object" ref="725298023"/>
+ <reference key="parent" ref="780270730"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">76</int>
+ <reference key="object" ref="999557578"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">80</int>
+ <reference key="object" ref="390655325"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">81</int>
+ <reference key="object" ref="986729151"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">82</int>
+ <reference key="object" ref="247680247"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">83</int>
+ <reference key="object" ref="728173208"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -747,7 +953,7 @@
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <array key="1.IBViewMetadataConstraints">
+ <array class="NSMutableArray" key="1.IBViewMetadataConstraints">
<reference ref="630587606"/>
<reference ref="7756024"/>
<reference ref="118803530"/>
@@ -762,8 +968,13 @@
<reference ref="1036238214"/>
<reference ref="342906512"/>
<reference ref="918242346"/>
+ <reference ref="986729151"/>
+ <reference ref="247680247"/>
<reference ref="719571487"/>
<reference ref="148058045"/>
+ <reference ref="999557578"/>
+ <reference ref="390655325"/>
+ <reference ref="728173208"/>
</array>
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -800,13 +1011,26 @@
<string key="61.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="70.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="71.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="72.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <boolean value="NO" key="72.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <array class="NSMutableArray" key="73.IBViewMetadataConstraints">
+ <reference ref="725298023"/>
+ </array>
+ <boolean value="NO" key="73.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+ <string key="75.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="76.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="80.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">71</int>
+ <int key="maxID">84</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -837,6 +1061,7 @@
<string key="fetchFullMessageSwitch">UISwitch</string>
<string key="hostnameTextField">UITextField</string>
<string key="passwordTextField">UITextField</string>
+ <string key="useOAuth2Switch">UISwitch</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="emailTextField">
@@ -855,6 +1080,10 @@
<string key="name">passwordTextField</string>
<string key="candidateClassName">UITextField</string>
</object>
+ <object class="IBToOneOutletInfo" key="useOAuth2Switch">
+ <string key="name">useOAuth2Switch</string>
+ <string key="candidateClassName">UISwitch</string>
+ </object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -865,9 +1094,17 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <real value="1552" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="4600" key="NS.object.0"/>
+ </object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<bool key="IBDocument.UseAutolayout">YES</bool>
- <string key="IBCocoaTouchPluginVersion">2083</string>
+ <string key="IBCocoaTouchPluginVersion">3682.6</string>
</data>
</archive>