Skip to content

Commit 301b332

Browse files
authored
feat: Update aws-swift-sdk dependency to 0.36.1 (#3519)
* initial commit * updating plugins to use new client protocols * update pinpoint unit tests * update integration test build errors * updating more code * updating todo's * add documentation for client protocol methods * worked on review comments * update the swift dependency to 0.36.0 * update doc * disable swift lint rules for client protocols * revert pre sign url logic * fix lint issues * removing extra white space * update sdk version * removing xc pretty to gather more build info * updated package resolved * trying out to comment customer user agent engine * trying different watchOS simulator * Revert "trying different watchOS simulator" This reverts commit 61eac18. * Revert "trying out to comment customer user agent engine" This reverts commit 6306a29. * updating project file * Revert "removing xc pretty to gather more build info" This reverts commit b7d876c.
1 parent 07c391f commit 301b332

File tree

46 files changed

+8410
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+8410
-406
lines changed

AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct IAMURLRequestInterceptor: URLRequestInterceptor {
4343
.flatMap(HttpMethodType.init(rawValue:)) ?? .get
4444

4545
let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems?
46-
.map { ClientRuntime.URLQueryItem(name: $0.name, value: $0.value)} ?? []
46+
.map { ClientRuntime.SDKURLQueryItem(name: $0.name, value: $0.value)} ?? []
4747

4848
let requestBuilder = SdkHttpRequestBuilder()
4949
.withHost(host)

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ extension AWSCognitoAuthPlugin {
103103
}
104104

105105
if let requestTimeout = networkPreferences?.timeoutIntervalForRequest {
106-
let requestTimeOutMs = requestTimeout * 1_000
107-
configuration.connectTimeoutMs = UInt32(requestTimeOutMs)
106+
configuration.httpClientConfiguration = HttpClientConfiguration(connectTimeout: requestTimeout)
108107
}
109108

110109
if let maxRetryUnwrapped = networkPreferences?.maxRetryCount {
@@ -126,8 +125,7 @@ extension AWSCognitoAuthPlugin {
126125
configuration.httpClientEngine = .userAgentEngine(for: configuration)
127126

128127
if let requestTimeout = networkPreferences?.timeoutIntervalForRequest {
129-
let requestTimeOutMs = requestTimeout * 1_000
130-
configuration.connectTimeoutMs = UInt32(requestTimeOutMs)
128+
configuration.httpClientConfiguration = HttpClientConfiguration(connectTimeout: requestTimeout)
131129
}
132130

133131
if let maxRetryUnwrapped = networkPreferences?.maxRetryCount {

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/HttpClientEngineProxy.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import ClientRuntime
1010
import Foundation
1111

12-
protocol HttpClientEngineProxy: HttpClientEngine {
13-
var target: HttpClientEngine? { get set }
12+
protocol HttpClientEngineProxy: HTTPClient {
13+
var target: HTTPClient? { get set }
1414
}
1515

1616
extension UserAgentSuffixAppender: HttpClientEngineProxy {}

AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ class AWSAuthSignInPluginTests: BasePluginTest {
955955

956956
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
957957
throw try await AWSCognitoIdentityProvider.PasswordResetRequiredException(
958-
httpResponse: .init(body: .none, statusCode: .badRequest),
958+
httpResponse: .init(body: .empty, statusCode: .badRequest),
959959
decoder: nil,
960960
message: nil,
961961
requestID: nil
@@ -1133,7 +1133,7 @@ class AWSAuthSignInPluginTests: BasePluginTest {
11331133

11341134
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
11351135
throw try await AWSCognitoIdentityProvider.UserNotConfirmedException(
1136-
httpResponse: .init(body: .none, statusCode: .badRequest)
1136+
httpResponse: .init(body: .empty, statusCode: .badRequest)
11371137
)
11381138
})
11391139

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/project.pbxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,11 +1111,18 @@
11111111
681B76C22A3CBBAE004B59D9 /* Debug */ = {
11121112
isa = XCBuildConfiguration;
11131113
buildSettings = {
1114+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
11141115
BUNDLE_LOADER = "$(TEST_HOST)";
11151116
CODE_SIGN_STYLE = Automatic;
11161117
CURRENT_PROJECT_VERSION = 1;
1117-
DEVELOPMENT_TEAM = 94KV3E626L;
1118+
DEVELOPMENT_TEAM = "";
11181119
GENERATE_INFOPLIST_FILE = YES;
1120+
INFOPLIST_KEY_CFBundleDisplayName = IntegTests;
1121+
LD_RUNPATH_SEARCH_PATHS = (
1122+
"$(inherited)",
1123+
"@loader_path/Frameworks",
1124+
"@executable_path/Frameworks",
1125+
);
11191126
MARKETING_VERSION = 1.0;
11201127
PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.auth.AuthIntegrationTests;
11211128
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1132,11 +1139,18 @@
11321139
681B76C32A3CBBAE004B59D9 /* Release */ = {
11331140
isa = XCBuildConfiguration;
11341141
buildSettings = {
1142+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
11351143
BUNDLE_LOADER = "$(TEST_HOST)";
11361144
CODE_SIGN_STYLE = Automatic;
11371145
CURRENT_PROJECT_VERSION = 1;
1138-
DEVELOPMENT_TEAM = 94KV3E626L;
1146+
DEVELOPMENT_TEAM = "";
11391147
GENERATE_INFOPLIST_FILE = YES;
1148+
INFOPLIST_KEY_CFBundleDisplayName = IntegTests;
1149+
LD_RUNPATH_SEARCH_PATHS = (
1150+
"$(inherited)",
1151+
"@loader_path/Frameworks",
1152+
"@executable_path/Frameworks",
1153+
);
11401154
MARKETING_VERSION = 1.0;
11411155
PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.auth.AuthIntegrationTests;
11421156
PRODUCT_NAME = "$(TARGET_NAME)";

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthHostApp.xcodeproj/xcshareddata/xcschemes/AuthIntegrationTestsWatch.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
buildConfiguration = "Debug"
1111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
1212
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13-
shouldUseLaunchSchemeArgsEnv = "YES"
14-
enableThreadSanitizer = "YES"
15-
codeCoverageEnabled = "YES">
13+
shouldUseLaunchSchemeArgsEnv = "YES">
1614
<Testables>
1715
<TestableReference
1816
skipped = "NO">

AmplifyPlugins/Auth/Tests/AuthHostApp/AuthIntegrationTests/SignOutTests/AuthSignOutTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AuthSignOutTests: AWSAuthBaseTest {
1818
try await super.setUp()
1919
AuthSessionHelper.clearSession()
2020
if Self.setSDKLogLevelDebug {
21-
SDKLoggingSystem.initialize(logLevel: .debug)
21+
await SDKLoggingSystem.initialize(logLevel: .debug)
2222
Self.setSDKLogLevelDebug = false
2323
}
2424
}

AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/ClientRuntimeFoundationBridge.swift

Lines changed: 0 additions & 60 deletions
This file was deleted.

AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngine.swift

Lines changed: 0 additions & 37 deletions
This file was deleted.

AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/FoundationClientEngineError.swift

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)