关于系统版本的问题

2017-04-06  本文已影响26人  lance017

新的项目上线了,但是遇到了新的问题,目前使用的是Xcode8.3开发APP,在iOS9中崩溃提示

dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications
  Referenced from: xxxx
  Reason: image not found

UserNotifications是iOS10的库,想要兼容10以下的版本需要以下的设置

1.导入的库默认是required,需要改为optional


图片

2.在导入UserNotifications,这样导入

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000
#import <UserNotifications/UserNotifications.h>
#endif
上一篇下一篇

猜你喜欢

热点阅读