问题描述
- iOS 和 个推集成 启动报错
-
2015-02-03 02:40:49.816 Gifted[7798:60b] You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2015-02-03 02:40:49.828 Gifted[7798:60b] Multi-tasking -> Device: YES, App: YES
2015-02-03 02:40:50.086 Gifted[7798:60b] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(0x2fed1ecb 0x3a668ce7 0x2fed1e0d 0x323773bb 0x323772bf 0x3237724f 0x32700443 0x32714563 0x3271449f 0x1661b3 0x165c81 0x1653f5 0x1664d3 0x164b65 0x1716cf 0x171b31 0x16e83b 0xf6757 0x32707a33 0x327077f1 0x3270e469 0x3270bdb9 0x32775a31 0xf529b 0x32772ca1 0x327725f3 0x3276cca9 0x32708c77 0x32707dd9 0x3276c3e5 0x34d65b55 0x34d6573f 0x2fe9c807 0x2fe9c7a3 0x2fe9af6f 0x2fe05729 0x2fe0550b 0x3276b60b 0x32766871 0xf34b3 0xf3440)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
解决方案
这问题是你没有 need to add "remote-notification"
你可以直接使用就好了
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
如果你也可以在 Capabilities 中 backgroundMode中设置
时间: 2024-10-28 12:20:05