내가 노력하고 통합하는 증폭 내 프로젝트가 어떤 문제로 구성되어 있습니다. 백엔드 보내 S3 스토리지 구성을 내는 프로젝트를 configurate 증폭과 데이터를 받았습니다. 나 configurate 저장소 다음과 같은 이 테스트는 그러나 그것의 실패와 함께 다음과 같은 오류가:
PluginError: Unable to decode configuration
Recovery suggestion: Make sure the plugin configuration is JSONValue
▿ pluginConfigurationError : 3 elements
- .0 : "Unable to decode configuration"
- .1 : "Make sure the plugin configuration is JSONValue"
- .2 : nil
이것은 나의 코드:
func amplifyConfigure() {
do {
Amplify.Logging.logLevel = .verbose
try Amplify.add(plugin: AWSCognitoAuthPlugin())
try Amplify.add(plugin: AWSS3StoragePlugin())
let storageConfiguration = StorageCategoryConfiguration(
plugins: [
"awsS3StoragePlugin": [
"bucket": "bucket",
"region": "us-west-2",
"defaultAccessLevel": "protected"
]
]
)
let amplifyConfiguration = AmplifyConfiguration(storage: storageConfiguration)
try Amplify.configure(amplifyConfiguration)
// LOG success.
} catch {
// LOG Error.
}
}
누군가의 도움을 받을 수 있는 나에게 이 사용자 정의 구성입니까? 감사합니다!