diff --git a/NestSDK.podspec b/NestSDK.podspec index ce20aa6..8ff2fdd 100644 --- a/NestSDK.podspec +++ b/NestSDK.podspec @@ -16,8 +16,8 @@ Pod::Spec.new do |s| s.license = 'MIT' s.author = { 'petroakzhygitov' => 'petro.akzhygitov@gmail.com' } - s.platform = :ios, '9.0' - s.ios.deployment_target = '8.0' + s.platform = :ios, '10.0' + s.ios.deployment_target = '10.0' s.source = { :git => 'https://github.com/petroakzhygitov/NestSDK.git', :tag => s.version.to_s } diff --git a/NestSDK/NestSDK.xcodeproj/project.pbxproj b/NestSDK/NestSDK.xcodeproj/project.pbxproj index a41ddb6..742967b 100644 --- a/NestSDK/NestSDK.xcodeproj/project.pbxproj +++ b/NestSDK/NestSDK.xcodeproj/project.pbxproj @@ -1355,7 +1355,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = NO; @@ -1397,7 +1397,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MODULEMAP_FILE = ""; MTL_ENABLE_DEBUG_INFO = NO; ONLY_ACTIVE_ARCH = NO; @@ -1422,7 +1422,7 @@ FRAMEWORK_SEARCH_PATHS = "$(inherited)/**"; INFOPLIST_FILE = NestSDK/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; MACH_O_TYPE = staticlib; @@ -1447,7 +1447,7 @@ FRAMEWORK_SEARCH_PATHS = "$(inherited)/**"; INFOPLIST_FILE = NestSDK/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; MACH_O_TYPE = staticlib; diff --git a/NestSDK/NestSDK.xcodeproj/xcuserdata/ruslantimchenko.xcuserdatad/xcschemes/xcschememanagement.plist b/NestSDK/NestSDK.xcodeproj/xcuserdata/ruslantimchenko.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..7a41c49 --- /dev/null +++ b/NestSDK/NestSDK.xcodeproj/xcuserdata/ruslantimchenko.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,24 @@ + + + + + SchemeUserState + + Documentation.xcscheme + + orderHint + 13 + + NestSDK.xcscheme_^#shared#^_ + + orderHint + 11 + + NestSDKIntegrationTests.xcscheme_^#shared#^_ + + orderHint + 12 + + + + diff --git a/NestSDK/NestSDK/NestSDKAuthorizationManager.m b/NestSDK/NestSDK/NestSDKAuthorizationManager.m index bfc2f27..db77499 100644 --- a/NestSDK/NestSDK/NestSDKAuthorizationManager.m +++ b/NestSDK/NestSDK/NestSDKAuthorizationManager.m @@ -192,8 +192,11 @@ - (void)authorizeWithNestAccountFromViewController:(UIViewController *)viewContr self.authorizationViewController = [[NestSDKAuthorizationViewController alloc] initWithAuthorizationURL:[self _authorizationURL] redirectURL:[self _redirectURL] delegate:self]; + + UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.authorizationViewController]; + [navController.view setBackgroundColor:[UIColor whiteColor]]; - [viewController presentViewController:_authorizationViewController animated:YES completion:nil]; + [viewController presentViewController:navController animated:YES completion:nil]; } - (void)unauthorize { @@ -215,4 +218,4 @@ - (void)viewController:(NestSDKAuthorizationViewController *)viewController didF [self _finishAuthorizationWithAuthorizationResult:nil error:error]; } -@end \ No newline at end of file +@end diff --git a/NestSDK/NestSDK/NestSDKAuthorizationViewController.m b/NestSDK/NestSDK/NestSDKAuthorizationViewController.m index c9b0af6..d90d5a2 100755 --- a/NestSDK/NestSDK/NestSDKAuthorizationViewController.m +++ b/NestSDK/NestSDK/NestSDKAuthorizationViewController.m @@ -82,29 +82,25 @@ - (void)_cancelBarButtonItemPressed:(id)sender { - (void)loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + [self.navigationController.view setBackgroundColor:[UIColor whiteColor]]; [self.view setBackgroundColor:[UIColor whiteColor]]; - // Add a navigation bar to the top - CGRect navigationBarFrame = CGRectMake(0, 0, self.view.frame.size.width, kNavigationBarHeight); - - UINavigationBar *navigationBar = [[UINavigationBar alloc] initWithFrame:navigationBarFrame]; - [self.view addSubview:navigationBar]; - // Add some items to the navigation bar UIBarButtonItem *cancelBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(_cancelBarButtonItemPressed:)]; - - UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle:kTitleStringConnectWithNest]; - navigationItem.leftBarButtonItem = cancelBarButtonItem; - [navigationBar pushNavigationItem:navigationItem animated:YES]; - + self.navigationController.title = kTitleStringConnectWithNest; + [self.navigationItem setLeftBarButtonItem:cancelBarButtonItem]; + // Add a UIWebView to take up the entire view (beneath the navigation bar) - CGRect webViewFrame = CGRectMake(0, kNavigationBarHeight, self.view.frame.size.width, self.view.frame.size.height - kNavigationBarHeight); + CGRect webViewFrame = CGRectMake(0, + self.navigationController.navigationBar.bounds.size.height, + [[UIScreen mainScreen] bounds].size.width, + [[UIScreen mainScreen] bounds].size.height - self.navigationController.navigationBar.bounds.size.height); self.webView = [[UIWebView alloc] initWithFrame:webViewFrame]; - self.webView.backgroundColor = [UIColor nestBlue]; + self.webView.backgroundColor = [UIColor whiteColor]; self.webView.delegate = self; [self.view addSubview:self.webView]; @@ -112,7 +108,7 @@ - (void)loadView { - (void)viewDidLoad { [super viewDidLoad]; - + // Set the title self.title = kTitleStringConnectWithNest;