我是 iOS 编程新手。我想在我的第一个应用程序中使用带有 Apptentive SDK 的反馈系统。编译时没有错误,但是当它开始与 Apptentive 服务器建立连接时,我收到以下错误消息:
2013-07-11 15:32:19.438 wishes[11015:c07] Loading ATWebClient_Metrics_Bootstrap
2013-07-11 15:32:19.438 wishes[11015:c07] Loading ATWebClient_SurveyAdditions_Bootstrap
2013-07-11 15:32:19.439 wishes[11015:c07] Loading ATURLConnection_Private_Bootstrap
2013-07-11 15:32:19.439 wishes[11015:c07] Loading ATWebClient_Private_Bootstrap
2013-07-11 15:32:19.439 wishes[11015:c07] Loading ATWebClient_MessageCenter_Bootstrap
2013-07-11 15:32:19.440 wishes[11015:c07] Loading ATToolbar_Bootstrap
2013-07-11 15:32:19.442 wishes[11015:1303] [info] Setting up data manager
2013-07-11 15:32:19.598 wishes[11015:1d03] [info] Creating conversation
**2013-07-11 15:32:19.616 wishes[11015:c07] -[NSManagedObject setup]: unrecognized selector sent to instance 0xa060110
2013-07-11 15:32:19.618 wishes[11015:c07] ** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSManagedObject setup]: unrecognized selector sent to instance 0xa060110'
** First throw call stack:
(0x2ef4012 0x23a0e7e 0x2f7f4bd 0x2ee3bbc 0x2ee394e 0xbc347 0xbc29f 0xf8f5b3 0x2eb3376 0x2eb2e06 0x2e9aa82 0x2e99f44 0x2e99e1b 0x2e4e7e3 0x2e4e668 0x26bffc 0x2afd 0x2a25)
libc++abi.dylib: terminate called throwing an exception**
在搜索论坛时,我发现这可能是 Apptentive SDK 使用的 CoreData 的问题,但在我写的时候,我是 iOS 开发的新手,所以我直到现在才使用 CodeData。
开始连接的代码:
ATConnect *connection = [ATConnect sharedConnection];
connection.apiKey = @"myApiKey";
[connection presentMessageCenterFromViewController:self];
当我用 apiKey assign 取消注释一行时,没有错误。
如果可以,请你帮助我。