Skip to content

Commit

Permalink
fix: Fixing compilation issue caused by AmplifyCredentials refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaland committed Aug 14, 2024
1 parent e3a1079 commit 5660bd9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation
import Amplify
import AWSLocationGeoPlugin
import AWSClientRuntime
import InternalAmplifyCredentials

extension AWSMapURLProtocol {
struct GeoConfig {
Expand All @@ -21,7 +22,10 @@ extension AWSMapURLProtocol {
assertionFailure(AWSMapURLProtocolError.configurationError.localizedDescription)
return nil
}
self.credentialsProvider = plugin.authService.getCredentialsProvider()
guard let credentiaslProvider = plugin.authService as? AWSAuthCredentialsProviderBehavior else {
return nil
}
self.credentialsProvider = credentiaslProvider.getCredentialsProvider()
self.regionName = plugin.pluginConfig.regionName
self.hostName = "maps.geo.\(regionName).amazonaws.com"
}
Expand Down

0 comments on commit 5660bd9

Please sign in to comment.