工程中配置
1.要更新最新的Jpush的库
2.导入 UserNotifications.framework(Xcode8及以上)
为了可以在低版本上运行 记得后面选择 Option 否则会报错误
dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications
Referenced from: /private/var/mobile/Containers/Bundle/Application/9F0D35E5-2189-48FD-A7C2-4C08D91EC2C8/MiYun360.app/MiYun360
Reason: image not found
3.项目中 Capabilities 记得打开
项目中的具体代码
1.APPdelegate 中导入 头文件 #import <UserNotifications/UserNotifications.h>