Skip to content
Merged
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
2 changes: 1 addition & 1 deletion AppAuth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ It follows the OAuth 2.0 for Native Apps best current practice
# classes of AppAuth with tokens on watchOS and tvOS, but currently the
# library won't help you obtain authorization grants on those platforms.

ios_deployment_target = "9.0"
ios_deployment_target = "10.0"
osx_deployment_target = "10.12"
s.ios.deployment_target = ios_deployment_target
s.osx.deployment_target = osx_deployment_target
Expand Down
22 changes: 12 additions & 10 deletions AppAuth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,7 @@
340E73861C5D819B0076B1F6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
Expand All @@ -2896,6 +2897,7 @@
340E73871C5D819B0076B1F6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
Expand All @@ -2907,7 +2909,7 @@
CLANG_ENABLE_MODULES = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/";
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.AppAuthTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2924,7 +2926,7 @@
CLANG_ENABLE_MODULES = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/";
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.openid.appauth.AppAuthTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -3038,7 +3040,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Sources/CoreFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.openid.AppAuthCore;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -3064,7 +3066,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Sources/CoreFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.openid.AppAuthCore;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -3089,7 +3091,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Sources/Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOS";
PRODUCT_NAME = AppAuth;
Expand All @@ -3114,7 +3116,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Sources/Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOS";
PRODUCT_NAME = AppAuth;
Expand All @@ -3133,7 +3135,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
HEADER_SEARCH_PATHS = .;
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -3147,7 +3149,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
HEADER_SEARCH_PATHS = .;
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -3401,7 +3403,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
HEADER_SEARCH_PATHS = .;
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-ExtensionTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -3415,7 +3417,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
HEADER_SEARCH_PATHS = .;
INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-ExtensionTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ Hernan Zalazar <hernan.zalazar@gmail.com> https://github.com/hzalaz
Joseph Heenan <joseph@emobix.co.uk> https://github.com/jogu
Julien Bodet <julien.bodet92@gmail.com> https://github.com/julienbodet
Tobias Schröpf <schroepf@gmail.com> https://github.com/schroepf
Dave MacLachlan <dmaclach@gmail.com> https://github.com/dmaclach
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let package = Package(
name: "AppAuth",
platforms: [
.macOS(.v10_12),
.iOS(.v9),
.iOS(.v10),
.tvOS(.v9),
.watchOS(.v2)
],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For tvOS, AppAuth implements [OAuth 2.0 Device Authorization Grant

#### Supported Versions

AppAuth supports iOS 7 and above.
AppAuth supports iOS 10 and above.

iOS 9+ uses the in-app browser tab pattern
(via `SFSafariViewController`), and falls back to the system browser (mobile
Expand Down
14 changes: 5 additions & 9 deletions Sources/AppAuth/iOS/OIDExternalUserAgentIOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,14 @@ - (BOOL)presentExternalUserAgentRequest:(id<OIDExternalUserAgentRequest>)request
openedUserAgent = YES;
}
}
// iOS 8 and earlier, use mobile Safari
// If all else failed use the local browser.
if (!openedUserAgent){
openedUserAgent = [[UIApplication sharedApplication] openURL:requestURL];
[[UIApplication sharedApplication] openURL:requestURL
options:@{}
completionHandler:nil];
openedUserAgent = YES;
}

if (!openedUserAgent) {
[self cleanUp];
NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError
underlyingError:nil
description:@"Unable to open Safari."];
[session failExternalUserAgentFlowWithError:safariError];
}
return openedUserAgent;
}

Expand Down
17 changes: 4 additions & 13 deletions Sources/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,26 +145,17 @@ - (BOOL)presentExternalUserAgentRequest:(nonnull id<OIDExternalUserAgentRequest>
NSString *testURLString = [NSString stringWithFormat:@"%@://example.com", _canOpenURLScheme];
NSURL *testURL = [NSURL URLWithString:testURLString];
if (![[UIApplication sharedApplication] canOpenURL:testURL]) {
if (@available(iOS 10.0, *)) {
[[UIApplication sharedApplication] openURL:_appStoreURL options:@{} completionHandler:nil];
} else {
[[UIApplication sharedApplication] openURL:_appStoreURL];
}
[[UIApplication sharedApplication] openURL:_appStoreURL options:@{} completionHandler:nil];
return NO;
}
}

// Transforms the request URL and opens it.
NSURL *requestURL = [request externalUserAgentRequestURL];
requestURL = _URLTransformation(requestURL);
if (@available(iOS 10.0, *)) {
BOOL willOpen = [[UIApplication sharedApplication] canOpenURL:requestURL];
[[UIApplication sharedApplication] openURL:requestURL options:@{} completionHandler:nil];
return willOpen;
} else {
BOOL openedInBrowser = [[UIApplication sharedApplication] openURL:requestURL];
return openedInBrowser;
}
BOOL willOpen = [[UIApplication sharedApplication] canOpenURL:requestURL];
[[UIApplication sharedApplication] openURL:requestURL options:@{} completionHandler:nil];
return willOpen;
}

- (void)dismissExternalUserAgentAnimated:(BOOL)animated
Expand Down