Skip to content

Commit

Permalink
Merge pull request #170 from WilliamDenniss/macos_availability
Browse files Browse the repository at this point in the history
Fixed deployment targets and availability.
  • Loading branch information
WilliamDenniss authored Oct 31, 2017
2 parents 96ea3e3 + 8db5df5 commit da23c69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions AppAuth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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
18 changes: 6 additions & 12 deletions AppAuth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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)";
Expand All @@ -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)";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Source/OIDURLQueryComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -112,7 +112,7 @@ - (void)addParameters:(NSDictionary<NSString *, NSString *> *)parameters {
@discussion The parameter names and values are NOT URL encoded.
@return An array of unencoded @c NSURLQueryItem objects.
*/
- (NSMutableArray<NSURLQueryItem *> *)queryItems NS_AVAILABLE_IOS(8.0) {
- (NSMutableArray<NSURLQueryItem *> *)queryItems NS_AVAILABLE(10.10, 8.0) {
NSMutableArray<NSURLQueryItem *> *queryParameters = [NSMutableArray array];
for (NSString *parameterName in _parameters.allKeys) {
NSArray<NSString *> *values = _parameters[parameterName];
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit da23c69

Please sign in to comment.