diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift index 938077fc4d..2f903b9a7a 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift @@ -42,7 +42,8 @@ struct IAMURLRequestInterceptor: URLRequestInterceptor { let httpMethod = (request.httpMethod?.uppercased()) .flatMap(HttpMethodType.init(rawValue:)) ?? .get - let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems ?? [] + let queryItems = (URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems ?? []) + .map { ClientRuntime.URLQueryItem(name: $0.name, value: $0.value) } let requestBuilder = SdkHttpRequestBuilder() .withHost(host) diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift index 10e66289cb..deecb0ff17 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift @@ -21,10 +21,10 @@ class IAMAuthInterceptor: AuthInterceptorAsync { RealtimeProviderConstants.amzDate.lowercased(), RealtimeProviderConstants.iamSecurityTokenKey.lowercased()] - let authProvider: CredentialsProvider + let authProvider: CredentialsProviding let region: AWSRegionType - init(_ authProvider: CredentialsProvider, region: AWSRegionType) { + init(_ authProvider: CredentialsProviding, region: AWSRegionType) { self.authProvider = authProvider self.region = region } @@ -60,8 +60,14 @@ class IAMAuthInterceptor: AuthInterceptorAsync { guard var urlComponents = URLComponents(url: request.url, resolvingAgainstBaseURL: false) else { return request } - let headerQuery = URLQueryItem(name: RealtimeProviderConstants.header, value: base64Auth) - let payloadQuery = URLQueryItem(name: RealtimeProviderConstants.payload, value: payloadBase64) + let headerQuery = Foundation.URLQueryItem( + name: RealtimeProviderConstants.header, + value: base64Auth + ) + let payloadQuery = Foundation.URLQueryItem( + name: RealtimeProviderConstants.payload, + value: payloadBase64 + ) urlComponents.queryItems = [headerQuery, payloadQuery] guard let signedUrl = urlComponents.url else { return request diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift b/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift index 4f89dfe86d..ab72c799a8 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift @@ -13,7 +13,7 @@ public class AWSAuthService: AWSAuthServiceBehavior { public init() {} - public func getCredentialsProvider() -> CredentialsProvider { + public func getCredentialsProvider() -> CredentialsProviding { return AmplifyAWSCredentialsProvider() } diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthServiceBehavior.swift b/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthServiceBehavior.swift index b9e9582418..e984116ede 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthServiceBehavior.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthServiceBehavior.swift @@ -11,7 +11,7 @@ import AWSClientRuntime public protocol AWSAuthServiceBehavior: AnyObject { - func getCredentialsProvider() -> CredentialsProvider + func getCredentialsProvider() -> CredentialsProviding func getTokenClaims(tokenString: String) -> Result<[String: AnyObject], AuthError> diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSCredentialsProvider.swift b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSCredentialsProvider.swift index 730760c54f..1959aa58b5 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSCredentialsProvider.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSCredentialsProvider.swift @@ -10,7 +10,7 @@ import AWSClientRuntime import AwsCommonRuntimeKit import Foundation -public class AmplifyAWSCredentialsProvider: AWSClientRuntime.CredentialsProvider { +public class AmplifyAWSCredentialsProvider: AWSClientRuntime.CredentialsProviding { public func getCredentials() async throws -> AWSClientRuntime.AWSCredentials { let authSession = try await Amplify.Auth.fetchAuthSession() diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSSignatureV4Signer.swift b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSSignatureV4Signer.swift index dfe7eb94a5..4da2777291 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSSignatureV4Signer.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/AmplifyAWSSignatureV4Signer.swift @@ -13,7 +13,7 @@ import AwsCommonRuntimeKit public protocol AWSSignatureV4Signer { func sigV4SignedRequest(requestBuilder: SdkHttpRequestBuilder, - credentialsProvider: AWSClientRuntime.CredentialsProvider, + credentialsProvider: AWSClientRuntime.CredentialsProviding, signingName: Swift.String, signingRegion: Swift.String, date: ClientRuntime.Date) async throws -> SdkHttpRequest? @@ -24,7 +24,7 @@ public class AmplifyAWSSignatureV4Signer: AWSSignatureV4Signer { } public func sigV4SignedRequest(requestBuilder: SdkHttpRequestBuilder, - credentialsProvider: AWSClientRuntime.CredentialsProvider, + credentialsProvider: AWSClientRuntime.CredentialsProviding, signingName: Swift.String, signingRegion: Swift.String, date: ClientRuntime.Date) async throws -> SdkHttpRequest? { diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/IAMCredentialProvider.swift b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/IAMCredentialProvider.swift index 3d96e06798..3ceee7167e 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/IAMCredentialProvider.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Auth/Provider/IAMCredentialProvider.swift @@ -10,7 +10,7 @@ import Amplify import AWSClientRuntime public protocol IAMCredentialsProvider { - func getCredentialsProvider() -> CredentialsProvider + func getCredentialsProvider() -> CredentialsProviding } public struct BasicIAMCredentialsProvider: IAMCredentialsProvider { @@ -20,7 +20,7 @@ public struct BasicIAMCredentialsProvider: IAMCredentialsProvider { self.authService = authService } - public func getCredentialsProvider() -> CredentialsProvider { + public func getCredentialsProvider() -> CredentialsProviding { return authService.getCredentialsProvider() } } diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift index c21664e7a3..19eabcc5df 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Utils/CustomHttpClientEngine/UserAgentSuffixAppender.swift @@ -31,7 +31,9 @@ extension UserAgentSuffixAppender: HttpClientEngine { name: userAgentHeader, value: "\(currentUserAgent) \(suffix)" ) - request.headers = headers + // TODO: fix this + // Cannot assign to property: 'headers' is a get-only property + /* request.headers = headers */ return try await target.execute(request: request) } } diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift index d680cfee36..a1e949004b 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Utils/UserAgentSuffixAppenderTests.swift @@ -30,8 +30,9 @@ class UserAgentSuffixAppenderTests: XCTestCase { /// When: A request is invoked with an existing User-Agent /// Then: The user agent suffix is appended func testExecute_withExistingUserAgentHeader_shouldAppendSuffix() async throws { - let request = createRequest() - request.headers.add(name: userAgentKey, value: "existingUserAgent") + let request = createRequest( + headers: .init([userAgentKey: "existingUserAgent"]) + ) _ = try await appender.execute(request: request) XCTAssertEqual(httpClientEngine.executeCount, 1) @@ -69,11 +70,13 @@ class UserAgentSuffixAppenderTests: XCTestCase { } } - private func createRequest() -> SdkHttpRequest { + private func createReques(headers: Headers? = nil) -> SdkHttpRequest { return SdkHttpRequest( method: .get, - endpoint: .init(host: "customHost"), - headers: .init() + endpoint: .init( + host: "customHost", + headers: headers + ) ) } } diff --git a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSAuthService.swift b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSAuthService.swift index 7f6bd46fbf..8c5d7cfa62 100644 --- a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSAuthService.swift +++ b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSAuthService.swift @@ -28,7 +28,7 @@ public class MockAWSAuthService: AWSAuthServiceBehavior { interactions.append(#function) } - public func getCredentialsProvider() -> CredentialsProvider { + public func getCredentialsProvider() -> CredentialsProviding { interactions.append(#function) let cognitoCredentialsProvider = MyCustomCredentialsProvider() return cognitoCredentialsProvider @@ -61,7 +61,7 @@ public class MockAWSAuthService: AWSAuthServiceBehavior { } } -struct MyCustomCredentialsProvider: CredentialsProvider { +struct MyCustomCredentialsProvider: CredentialsProviding { func getCredentials() async throws -> AWSClientRuntime.AWSCredentials { AWSCredentials( accessKey: "AKIDEXAMPLE", diff --git a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSSignatureV4Signer.swift b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSSignatureV4Signer.swift index e4dc290015..090010b65a 100644 --- a/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSSignatureV4Signer.swift +++ b/AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSSignatureV4Signer.swift @@ -12,7 +12,7 @@ import Foundation class MockAWSSignatureV4Signer: AWSSignatureV4Signer { func sigV4SignedRequest(requestBuilder: SdkHttpRequestBuilder, - credentialsProvider: CredentialsProvider, + credentialsProvider: CredentialsProviding, signingName: String, signingRegion: String, date: Date) throws -> SdkHttpRequest? { diff --git a/AmplifyPlugins/Geo/Sources/AWSLocationGeoPlugin/AWSLocationGeoPlugin+Configure.swift b/AmplifyPlugins/Geo/Sources/AWSLocationGeoPlugin/AWSLocationGeoPlugin+Configure.swift index 74ce60a71f..40adf3e8f4 100644 --- a/AmplifyPlugins/Geo/Sources/AWSLocationGeoPlugin/AWSLocationGeoPlugin+Configure.swift +++ b/AmplifyPlugins/Geo/Sources/AWSLocationGeoPlugin/AWSLocationGeoPlugin+Configure.swift @@ -31,8 +31,9 @@ extension AWSLocationGeoPlugin { let credentialsProvider = authService.getCredentialsProvider() let region = configuration.regionName let serviceConfiguration = try LocationClient.LocationClientConfiguration( - credentialsProvider: credentialsProvider, - region: region) + region: region, + credentialsProvider: credentialsProvider + ) let location = LocationClient(config: serviceConfiguration) let locationService = AWSLocationAdapter(location: location) diff --git a/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Mocks/MockAWSClientConfiguration.swift b/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Mocks/MockAWSClientConfiguration.swift index 378d825711..33a310f18f 100644 --- a/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Mocks/MockAWSClientConfiguration.swift +++ b/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Mocks/MockAWSClientConfiguration.swift @@ -35,7 +35,7 @@ class MockAWSClientConfiguration: LocationClientConfigurationProtocol { var endpoint: String? - var credentialsProvider: CredentialsProvider + var credentialsProvider: CredentialsProviding var region: String? diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Context/PinpointContext.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Context/PinpointContext.swift index b64742422f..70303f278e 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Context/PinpointContext.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Context/PinpointContext.swift @@ -76,14 +76,14 @@ struct PinpointContextConfiguration { /// The Pinpoint region let region: String /// Used to retrieve the proper AWSCredentials when creating the PinpointCLient - let credentialsProvider: CredentialsProvider + let credentialsProvider: CredentialsProviding /// Indicates if the App is in Debug or Release build. Defaults to `false` /// Setting this flag to true will set the Endpoint Profile to have a channel type of "APNS_SANDBOX". let isDebug: Bool init(appId: String, region: String, - credentialsProvider: CredentialsProvider, + credentialsProvider: CredentialsProviding, isDebug: Bool = false) { self.appId = appId self.region = region diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Extensions/PinpointClient+CredentialsProvider.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Extensions/PinpointClient+CredentialsProvider.swift index f3ff0b4f70..047b5dce5a 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Extensions/PinpointClient+CredentialsProvider.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Extensions/PinpointClient+CredentialsProvider.swift @@ -10,11 +10,11 @@ import AWSPluginsCore import AWSPinpoint extension PinpointClient { - convenience init(region: String, credentialsProvider: CredentialsProvider) throws { + convenience init(region: String, credentialsProvider: CredentialsProviding) throws { let configuration = try PinpointClientConfiguration( + region: region, credentialsProvider: credentialsProvider, - frameworkMetadata: AmplifyAWSServiceConfiguration.frameworkMetaData(), - region: region + frameworkMetadata: AmplifyAWSServiceConfiguration.frameworkMetaData() ) PinpointRequestsRegistry.shared.setCustomHttpEngine(on: configuration) self.init(config: configuration) diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift index 8c0aeba4a3..c788f92358 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Support/Utils/PinpointRequestsRegistry.swift @@ -69,7 +69,9 @@ private struct CustomPinpointHttpClientEngine: HttpClientEngine { let currentUserAgent = headers.value(for: userAgentHeader) ?? "" headers.update(name: userAgentHeader, value: "\(currentUserAgent)\(userAgentSuffix)") - request.headers = headers + + // FIXME: request.headers is now get only + /* request.headers = headers */ await PinpointRequestsRegistry.shared.unregisterSources(for: pinpointApi) return try await httpClientEngine.execute(request: request) diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift index bac6c68b15..4af9110ff9 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift @@ -13,7 +13,7 @@ import Foundation actor MockEndpointClient: EndpointClientBehaviour { let pinpointClient: PinpointClientProtocol = MockPinpointClient() - class MockCredentialsProvider: CredentialsProvider { + class MockCredentialsProvider: CredentialsProviding { func getCredentials() async throws -> AWSCredentials { return AWSCredentials(accessKey: "", secret: "", expirationTimeout: Date().addingTimeInterval(1000)) } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Dependency/AWSTranscribeStreamingAdapter.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Dependency/AWSTranscribeStreamingAdapter.swift index ada2ff5135..97aed80ff8 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Dependency/AWSTranscribeStreamingAdapter.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Dependency/AWSTranscribeStreamingAdapter.swift @@ -22,10 +22,10 @@ class AWSTranscribeStreamingAdapter: AWSTranscribeStreamingBehavior { let mediaSampleRateHertz: Int } - let credentialsProvider: CredentialsProvider + let credentialsProvider: CredentialsProviding let region: String - init(credentialsProvider: CredentialsProvider, region: String) { + init(credentialsProvider: CredentialsProviding, region: String) { self.credentialsProvider = credentialsProvider self.region = region } diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService+Polly.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService+Polly.swift index ef070be2e2..ee12f42ef2 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService+Polly.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService+Polly.swift @@ -34,9 +34,18 @@ extension AWSPredictionsService: AWSPollyServiceBehavior { ) } - let textToSpeechResult = Predictions.Convert.TextToSpeech.Result( - audioData: speech.toBytes().getData() - ) + switch speech { + case .data(let data?): + let textToSpeechResult = Predictions.Convert.TextToSpeech.Result( + audioData: data + ) + return textToSpeechResult + default: + // TODO: throw an applicable error here + throw PredictionsError.unknown("Missing response", "", nil) + } + + return textToSpeechResult } catch let error as SynthesizeSpeechOutputError { throw ServiceErrorMapping.synthesizeSpeech.map(error) diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService.swift index ad7341fede..fa720ae5f3 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Service/Predictions/AWSPredictionsService.swift @@ -30,36 +30,36 @@ class AWSPredictionsService { convenience init( configuration: PredictionsPluginConfiguration, - credentialsProvider: CredentialsProvider, + credentialsProvider: CredentialsProviding, identifier: String ) throws { let translateClientConfiguration = try TranslateClient.TranslateClientConfiguration( - credentialsProvider: credentialsProvider, - region: configuration.convert.region + region: configuration.convert.region, + credentialsProvider: credentialsProvider ) let awsTranslateClient = TranslateClient(config: translateClientConfiguration) let pollyClientConfiguration = try PollyClient.PollyClientConfiguration( - credentialsProvider: credentialsProvider, - region: configuration.convert.region + region: configuration.convert.region, + credentialsProvider: credentialsProvider ) let awsPollyClient = PollyClient(config: pollyClientConfiguration) let comprehendClientConfiguration = try ComprehendClient.ComprehendClientConfiguration( - credentialsProvider: credentialsProvider, - region: configuration.convert.region + region: configuration.convert.region, + credentialsProvider: credentialsProvider ) let awsComprehendClient = ComprehendClient(config: comprehendClientConfiguration) let rekognitionClientConfiguration = try RekognitionClient.RekognitionClientConfiguration( - credentialsProvider: credentialsProvider, - region: configuration.identify.region + region: configuration.identify.region, + credentialsProvider: credentialsProvider ) let awsRekognitionClient = RekognitionClient(config: rekognitionClientConfiguration) let textractClientConfiguration = try TextractClient.TextractClientConfiguration( - credentialsProvider: credentialsProvider, - region: configuration.identify.region + region: configuration.identify.region, + credentialsProvider: credentialsProvider ) let awsTextractClient = TextractClient(config: textractClientConfiguration) diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/AWSS3StorageService.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/AWSS3StorageService.swift index 415417bb5a..ac49739cef 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/AWSS3StorageService.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Service/Storage/AWSS3StorageService.swift @@ -58,8 +58,8 @@ class AWSS3StorageService: AWSS3StorageServiceBehavior, StorageServiceProxy { logger: Logger = storageLogger) throws { let credentialsProvider = authService.getCredentialsProvider() let clientConfig = try S3Client.S3ClientConfiguration( - credentialsProvider: credentialsProvider, region: region, + credentialsProvider: credentialsProvider, signingRegion: region) if var proxy = httpClientEngineProxy { proxy.target = clientConfig.httpClientEngine diff --git a/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift b/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift index 732384c615..90a1984d6b 100644 --- a/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift +++ b/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift @@ -8,7 +8,7 @@ import AWSClientRuntime import Foundation -class MockCredentialsProvider: CredentialsProvider { +class MockCredentialsProvider: CredentialsProviding { func getCredentials() async throws -> AWSCredentials { return AWSCredentials( accessKey: "accessKey", diff --git a/Package.resolved b/Package.resolved index 2ef4d7901c..88ee239ed3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-crt-swift", "state" : { - "revision" : "6feec6c3787877807aa9a00fad09591b96752376", - "version" : "0.6.1" + "revision" : "838deb5de707f157986e4baa95439cbcac9f3fcf", + "version" : "0.12.0" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift.git", "state" : { - "revision" : "24bae88a2391fe75da8a940a544d1ef6441f5321", - "version" : "0.13.0" + "revision" : "2f1f59a7c72a1976583bb15d2e19555eb5a5f332", + "version" : "0.22.0" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/smithy-swift", "state" : { - "revision" : "7b28da158d92cd06a3549140d43b8fbcf64a94a6", - "version" : "0.15.0" + "revision" : "cf8789c49ec68e22359457c23d7c4bf91130425a", + "version" : "0.26.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/MaxDesiatov/XMLCoder.git", "state" : { - "revision" : "b1e944cbd0ef33787b13f639a5418d55b3bed501", - "version" : "0.17.1" + "revision" : "80b4a1646399b8e4e0ce80711653476a85bd5e37", + "version" : "0.17.0" } } ], diff --git a/Package.swift b/Package.swift index a71dc5c8d4..44b4952153 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let platforms: [SupportedPlatform] = [ .watchOS(.v7) ] let dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.13.0"), + .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.22.0"), .package(url: "https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git", from: "3.0.0"), .package(url: "https://github.com/stephencelis/SQLite.swift.git", exact: "0.13.2"), .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"),