小编Sib*_*out的帖子

'NSInvalidArgumentException',原因:'***setObjectForKey:object不能为nil(key:device_uid)'

尝试在iPhone上运行应用程序时出错.我不明白为什么我在这种情况下有一个零错误

>    Terminating app due to uncaught exception 'NSInvalidArgumentException',<br/>
>    reason: '  setObjectForKey: object cannot be nil (key: device_id)'<br/>
>    First throw call stack:<br/>
    (0x183ce0f48 0x19918bf80 0x183bcc4e0 0x10006f5f0 0x1002b9ca8 0x1002b9c68 0x1002bf710 0x183c981f8 0x183c96060 0x183bc4ca0 0x18f148088 0x1892dcffc 0x1000716a0 0x1999ce8b8)<br/>
    libc++abi.dylib: terminating with uncaught exception of type NSException

Here is the part of    appdelegate.m file concerned by this error :

// Get the users Device Model, Display Name, Token & Version Number
UIDevice *device = [UIDevice currentDevice];

NSUserDefaults *dict = [NSUserDefaults standardUserDefaults]; …
Run Code Online (Sandbox Code Playgroud)

crash objective-c ios ios8.4

2
推荐指数
1
解决办法
8357
查看次数

标签 统计

crash ×1

ios ×1

ios8.4 ×1

objective-c ×1