未解决

百度推送,二次启动应用崩溃 [BPushUtility isAllowedNotificationCallback:] #34981个回答

push_client_sdk_for_ios 1.5.4 melodyrite520 2018-08-07

问:
在swift工程中集成SDK,运行后程序崩溃,日志如下: 2018-06-25 16:14:13.553708+0800 BS5Bus[2173:1015664] setting plist 存在并且不是目录。 2018-06-25 16:14:13.553838+0800 BS5Bus[2173:1015664] cur ver: 1.0.180622, old ver: 1.0.180622 2018-06-25 16:14:13.553928+0800 BS5Bus[2173:1015664] +[BPushUtility isAllowedNotificationCallback:]: unrecognized selector sent to class 0x102e32338 2018-06-25 16:14:13.558013+0800 BS5Bus[2173:1015664] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BPushUtility isAllowedNotificationCallback:]: unrecognized selector sent to class 0x102e32338' *** First throw call stack: (0x181c82d8c 0x180e3c5ec 0x181c8ffd8 0x181c885c8 0x181b6e41c 0x1025646a8 0x1025626ac 0x10252a360 0x102528a5c 0x102528b5c 0x18b852e38 0x18b852240 0x18b81f65c 0x18be4fa0c 0x18b81ee4c 0x18b81ece8 0x18b81db78 0x18c4b372c 0x18b81d268 0x18c2989b8 0x18c3e6ae8 0x18b81cc88 0x18b81c624 0x18b81965c 0x18b8193ac 0x184480470 0x184488d6c 0x104459220 0x104465850 0x1844b4878 0x1844b451c 0x1844b4ab8 0x181c2b404 0x181c2ac2c 0x181c2879c 0x181b48da8 0x183b2b020 0x18bb2978c 0x1025315c4 0x1815d9fc0) libc++abi.dylib: terminating with uncaught exception of type NSException
确认 取消
答:
在Other Linker Flags里添加-all_load或者是-Objc,一般来说添加-Objc就可以了,-all_load有时候会报错。

想要or需要 2019-01-15