
以下是应考虑的一些因素/约束:
>我有一个相当庞大的iOS开发团队.
>一些开发人员仍在使用xCode 5,它不能使用iOS 8 API进行编译.
>一些开发人员已经在使用xCode 6.2 Beta 3,它使用xCode 6.1.1中没有的额外WatchKit目标.
>绝大多数开发人员都在使用xCode 6.1.1.
谢谢您的帮助!
解决方法 幸运的是,这是相当直接的.您需要做的就是使用编译器指令,最好是在推送通知中心的头文件中.在条件指令中,您可以使用定义将自己的常量集映射到新集或不建议集,具体取决于xCode支持的最新iOS版本.#ifdef __IPHONE_8_0 #define RemoteNotificationTypeAlert UIUserNotificationTypeAlert #define RemoteNotificationTypeBadge UIUserNotificationTypeBadge #define RemoteNotificationTypeSound UIUserNotificationTypeSound #define RemoteNotificationTypeNone UIUserNotificationTypeNone#else #define RemoteNotificationTypeAlert UIRemoteNotificationTypeAlert #define RemoteNotificationTypeBadge UIRemoteNotificationTypeBadge #define RemoteNotificationTypeSound UIRemoteNotificationTypeSound #define RemoteNotificationTypeNone UIRemoteNotificationTypeNone#endif总结
以上是内存溢出为你收集整理的ios – UIRemoteNotificationTypeAlert已弃用 – 如何与大型团队一起过渡到UIUserNotificationTypeAlert?全部内容,希望文章能够帮你解决ios – UIRemoteNotificationTypeAlert已弃用 – 如何与大型团队一起过渡到UIUserNotificationTypeAlert?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)