From 8db5df5d0792070be12986fdb3349dd5abde4bcf Mon Sep 17 00:00:00 2001 From: William Denniss Date: Tue, 31 Oct 2017 12:52:57 -0700 Subject: [PATCH] =?UTF-8?q?Fixed=20deployment=20targets=20and=20availabili?= =?UTF-8?q?ty.=20=E2=80=93=C2=A0iOS=20deployment=20target=20is=207.0=20for?= =?UTF-8?q?=20the=20static=20lib,=20and=208.0=20for=20the=20Framework=20(t?= =?UTF-8?q?he=20static=20lib=20had=20been=20set=20to=208.0=20incorrectly).?= =?UTF-8?q?=20=E2=80=93=C2=A0macOS=20deployment=20target=20is=2010.9=20(wa?= =?UTF-8?q?s=20on=2010.8,=20but=20wouldn't=20have=20worked).=20=E2=80=93?= =?UTF-8?q?=C2=A0Added=20proper=20availability=20flags=20to=20OIDURLQueryC?= =?UTF-8?q?omponent=20for=20macOS.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppAuth.podspec | 4 ++-- AppAuth.xcodeproj/project.pbxproj | 18 ++++++------------ Source/OIDURLQueryComponent.m | 6 +++--- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/AppAuth.podspec b/AppAuth.podspec index 7acf89744..c3e95bfd1 100644 --- a/AppAuth.podspec +++ b/AppAuth.podspec @@ -30,7 +30,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. - s.platforms = { :ios => "7.0", :osx => "10.8", :watchos => "2.0", :tvos => "9.0" } + s.platforms = { :ios => "7.0", :osx => "10.9", :watchos => "2.0", :tvos => "9.0" } s.source = { :git => "https://github.com/openid/AppAuth-iOS.git", :tag => s.version } @@ -44,5 +44,5 @@ It follows the OAuth 2.0 for Native Apps best current practice # macOS s.osx.source_files = "Source/macOS/**/*.{h,m}" - s.osx.deployment_target = '10.8' + s.osx.deployment_target = '10.9' end diff --git a/AppAuth.xcodeproj/project.pbxproj b/AppAuth.xcodeproj/project.pbxproj index 9ed2c8830..8244e0767 100644 --- a/AppAuth.xcodeproj/project.pbxproj +++ b/AppAuth.xcodeproj/project.pbxproj @@ -1792,7 +1792,6 @@ CLANG_ANALYZER_NONNULL = YES; CODE_SIGN_IDENTITY = "-"; EXECUTABLE_PREFIX = lib; - MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -1806,7 +1805,6 @@ CLANG_ANALYZER_NONNULL = YES; CODE_SIGN_IDENTITY = "-"; EXECUTABLE_PREFIX = lib; - MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -1857,7 +1855,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1902,7 +1901,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -1969,7 +1969,6 @@ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/"; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -1986,7 +1985,6 @@ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/"; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2106,7 +2104,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; HEADER_SEARCH_PATHS = .; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2120,7 +2118,7 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; HEADER_SEARCH_PATHS = .; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2276,7 +2274,6 @@ INFOPLIST_FILE = Source/Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOS"; PRODUCT_NAME = AppAuth; SDKROOT = macosx; @@ -2303,7 +2300,6 @@ INFOPLIST_FILE = Source/Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOS"; PRODUCT_NAME = AppAuth; SDKROOT = macosx; @@ -2323,7 +2319,6 @@ HEADER_SEARCH_PATHS = .; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -2340,7 +2335,6 @@ HEADER_SEARCH_PATHS = .; INFOPLIST_FILE = UnitTests/UnitTestsInfo.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_BUNDLE_IDENTIFIER = "net.openid.AppAuth-macOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; diff --git a/Source/OIDURLQueryComponent.m b/Source/OIDURLQueryComponent.m index 5b2d9df89..6a70d91ad 100644 --- a/Source/OIDURLQueryComponent.m +++ b/Source/OIDURLQueryComponent.m @@ -39,7 +39,7 @@ - (nullable instancetype)init { - (nullable instancetype)initWithURL:(NSURL *)URL { self = [self init]; if (self) { - if (@available(iOS 8.0, *)) { + if (@available(iOS 8.0, macOS 10.10, *)) { // If NSURLQueryItem is available, use it for deconstructing the new URL. (iOS 8+) if (!gOIDURLQueryComponentForceIOS7Handling) { NSURLComponents *components = @@ -112,7 +112,7 @@ - (void)addParameters:(NSDictionary *)parameters { @discussion The parameter names and values are NOT URL encoded. @return An array of unencoded @c NSURLQueryItem objects. */ -- (NSMutableArray *)queryItems NS_AVAILABLE_IOS(8.0) { +- (NSMutableArray *)queryItems NS_AVAILABLE(10.10, 8.0) { NSMutableArray *queryParameters = [NSMutableArray array]; for (NSString *parameterName in _parameters.allKeys) { NSArray *values = _parameters[parameterName]; @@ -158,7 +158,7 @@ - (NSString *)percentEncodedQueryString { - (NSString *)URLEncodedParameters { // If NSURLQueryItem is available, uses it for constructing the encoded parameters. (iOS 8+) - if (@available(iOS 8.0, *)) { + if (@available(iOS 8.0, macOS 10.10, *)) { if (!gOIDURLQueryComponentForceIOS7Handling) { NSURLComponents *components = [[NSURLComponents alloc] init]; components.queryItems = [self queryItems];