我收到以下错误
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: objectid)'
它是字典还是核心数据?我不知道崩溃发生在哪里。
2015-03-18 12:47:23.239 OneChannelApp[3039:6403] INFO: GoogleAnalytics 3.10 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:219): 2 hit(s) sent
2015-03-18 12:47:27.804 OneChannelApp[3039:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: objectid)'
*** First throw call stack:
(0x30668f83 0x3ae19ccf 0x305a48f3 0xbf357 0x32ea06df 0x3301643f 0x32f33d63 0x32f33b6d 0x32f33b05 0x32e85d59 0x32b0362b 0x32afee3b 0x32afeccd 0x32afe6df 0x32afe4ef 0x32af821d 0x30634255 0x30631bf9 0x30631f3b 0x3059cebf 0x3059cca3 0x354a2663 0x32ee914d 0x20555d 0x3b326ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
最佳答案
这很可能是NSDictionary
错误。就像说的那样,您正在将对象设置为nil
。
另外,您没有得到错误的行号或跟踪信息吗?