Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NestSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Pod::Spec.new do |s|
s.license = 'MIT'
s.author = { 'petroakzhygitov' => '[email protected]' }

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 }

Expand Down
8 changes: 4 additions & 4 deletions NestSDK/NestSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Documentation.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>NestSDK.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>NestSDKIntegrationTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>12</integer>
</dict>
</dict>
</dict>
</plist>
7 changes: 5 additions & 2 deletions NestSDK/NestSDK/NestSDKAuthorizationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -215,4 +218,4 @@ - (void)viewController:(NestSDKAuthorizationViewController *)viewController didF
[self _finishAuthorizationWithAuthorizationResult:nil error:error];
}

@end
@end
24 changes: 10 additions & 14 deletions NestSDK/NestSDK/NestSDKAuthorizationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,33 @@ - (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];
}

- (void)viewDidLoad {
[super viewDidLoad];

// Set the title
self.title = kTitleStringConnectWithNest;

Expand Down