AWS Swift 突然崩溃
AWS Swift sudden crash
应用程序在到达 application(_:didFinishLaunchingWithOptions:)
之前崩溃。
之前好好的,不知道为什么突然崩溃了。
得到这个痕迹。
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'defaultServiceConfiguration
is nil
. You need to set it before using this method.'
不知道确切的问题,但在需要时而不是在 class 声明之后创建 AWSDynamoDBObjectMapper
对象解决了我的问题。
在使用之前定义:
let dynamoDBObjectMapper:AWSDynamoDBObjectMapper = AWSDynamoDBObjectMapper.defaultDynamoDBObjectMapper()
应用程序在到达 application(_:didFinishLaunchingWithOptions:)
之前崩溃。
之前好好的,不知道为什么突然崩溃了。 得到这个痕迹。
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '
defaultServiceConfiguration
isnil
. You need to set it before using this method.'
不知道确切的问题,但在需要时而不是在 class 声明之后创建 AWSDynamoDBObjectMapper
对象解决了我的问题。
在使用之前定义:
let dynamoDBObjectMapper:AWSDynamoDBObjectMapper = AWSDynamoDBObjectMapper.defaultDynamoDBObjectMapper()