From 98bfec0617d4cb88784c132b2a9dd90bb12724ab Mon Sep 17 00:00:00 2001 From: Oleg Gnidets <77254185+oleggnidets-okta@users.noreply.github.com> Date: Fri, 3 Dec 2021 00:00:01 +0200 Subject: [PATCH] Ognidets version bump (#322) * Version increment to 3.11.0 * Changed error code visibility for tests * Fix tests referencing underlyingErrors on macOS Co-authored-by: Mike Nachbaur --- Example/Info.plist | 2 +- OktaOidc.podspec | 2 +- Sources/AppAuth/OktaUserAgent.m | 2 +- Sources/OktaOidc/Common/OktaOidcError.swift | 2 +- Tests/OktaOidcTests/OktaOidcErrorTests.swift | 6 +++--- okta-oidc.xcodeproj/project.pbxproj | 10 ++++++---- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Example/Info.plist b/Example/Info.plist index 030ec0392ae..7546fb3a90e 100644 --- a/Example/Info.plist +++ b/Example/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleURLTypes diff --git a/OktaOidc.podspec b/OktaOidc.podspec index 7d346294f98..8865a97ec61 100644 --- a/OktaOidc.podspec +++ b/OktaOidc.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'OktaOidc' - s.version = '3.10.8' + s.version = '3.11.0' s.summary = 'SDK to easily integrate AppAuth with Okta' s.description = <<-DESC Integrate your native app with Okta using the AppAuth library. diff --git a/Sources/AppAuth/OktaUserAgent.m b/Sources/AppAuth/OktaUserAgent.m index a24be6a29fa..ada1d19ea3f 100644 --- a/Sources/AppAuth/OktaUserAgent.m +++ b/Sources/AppAuth/OktaUserAgent.m @@ -22,7 +22,7 @@ +(void)setUserAgentValue:(NSString*)value { } +(NSString*)userAgentVersion { - return @"3.10.8"; + return @"3.11.0"; } +(NSString*)userAgentHeaderKey { diff --git a/Sources/OktaOidc/Common/OktaOidcError.swift b/Sources/OktaOidc/Common/OktaOidcError.swift index e249881fc2f..aad0a958aec 100644 --- a/Sources/OktaOidc/Common/OktaOidcError.swift +++ b/Sources/OktaOidc/Common/OktaOidcError.swift @@ -45,7 +45,7 @@ public enum OktaOidcError: CustomNSError { /// Most of errors returns the general error code. /// Error like `api`, `unexpectedAuthCodeResponse` return specific error code. /// `api` returns the general error code if `underlyingError` is absent. - private static let generalErrorCode = -1012009 + static let generalErrorCode = -1012009 public var errorCode: Int { switch self { diff --git a/Tests/OktaOidcTests/OktaOidcErrorTests.swift b/Tests/OktaOidcTests/OktaOidcErrorTests.swift index 788fdc430f4..1e08e4feda9 100644 --- a/Tests/OktaOidcTests/OktaOidcErrorTests.swift +++ b/Tests/OktaOidcTests/OktaOidcErrorTests.swift @@ -31,7 +31,7 @@ final class OktaOidcErrorTests: XCTestCase { XCTAssertEqual(error.userInfo[NSLocalizedDescriptionKey] as! String, error.localizedDescription) XCTAssertNil(error.userInfo[NSUnderlyingErrorKey] as? NSError) - if #available(iOS 14.5, *) { + if #available(iOS 14.5, macOS 11.3, *) { XCTAssertTrue(error.underlyingErrors.isEmpty) } } @@ -47,7 +47,7 @@ final class OktaOidcErrorTests: XCTestCase { XCTAssertEqual(error.userInfo[NSUnderlyingErrorKey] as! NSError, underlyingError) XCTAssertEqual(error.userInfo[NSLocalizedDescriptionKey] as! String, error.localizedDescription) - if #available(iOS 14.5, *) { + if #available(iOS 14.5, macOS 11.3, *) { XCTAssertEqual(error.underlyingErrors.first! as NSError, underlyingError) } } @@ -60,7 +60,7 @@ final class OktaOidcErrorTests: XCTestCase { XCTAssertNil(error.userInfo[NSUnderlyingErrorKey] as? NSError) XCTAssertEqual(error.userInfo[NSLocalizedDescriptionKey] as! String, error.localizedDescription) - if #available(iOS 14.5, *) { + if #available(iOS 14.5, macOS 11.3, *) { XCTAssertTrue(error.underlyingErrors.isEmpty) } } diff --git a/okta-oidc.xcodeproj/project.pbxproj b/okta-oidc.xcodeproj/project.pbxproj index 18e70f16ae2..0575f0b35fb 100644 --- a/okta-oidc.xcodeproj/project.pbxproj +++ b/okta-oidc.xcodeproj/project.pbxproj @@ -1764,7 +1764,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.10.8; + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = "com.okta.okta-oidc"; PRODUCT_NAME = OktaOidc; SKIP_INSTALL = YES; @@ -1794,7 +1794,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.10.8; + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = "com.okta.okta-oidc"; PRODUCT_NAME = OktaOidc; SKIP_INSTALL = YES; @@ -1816,6 +1816,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = com.okta.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1834,6 +1835,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = com.okta.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1940,7 +1942,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 3.10.8; + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = "com.okta.okta-oidc"; PRODUCT_NAME = OktaOidc; SDKROOT = macosx; @@ -1967,7 +1969,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 3.10.8; + MARKETING_VERSION = 3.11.0; PRODUCT_BUNDLE_IDENTIFIER = "com.okta.okta-oidc"; PRODUCT_NAME = OktaOidc; SDKROOT = macosx;