iOS Bug --- 信鸽推送报错:dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.fra......

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jiaxin_1105/article/details/82621494

最近在接信鸽推送SDK,官方Demo运行直接崩溃。。。

报错信息:

dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications

  Referenced from: /Users/pengjiaxin/Library/Developer/CoreSimulator/Devices/B6F10A28-530D-44BA-8F3A-87B551132FE2/data/Containers/Bundle/Application/8C29BAE6-6706-4BF8-AEA3-2CDD8DE10E86/XG-Demo.app/XG-Demo

  Reason: image not found

(lldb)

原因分析:

从报错信息上面可以看到是 UserNotifications.framework  image not found ,因为这个UserNotifications.framework在iOS10以下的版本是不可以用的,只能在iOS10及以上版本可以用,到此问题找到。

解决方法:

TARGETS -->Build Phases -->Link Binary With Libraries -->UserNotifications.framework 然后把status由Required改为Optional,然后在运行,就ok。

 

猜你喜欢

转载自blog.csdn.net/jiaxin_1105/article/details/82621494