【发布时间】:2016-06-14 05:46:01
【问题描述】:
这是当前的UILocalNotification class,这是苹果刚刚在 wwdc 16 中宣布的 iOS 10 UserNotification。
使用 UILocalNotification 的旧应用会在 iOS 10 上崩溃吗?
【问题讨论】:
标签: ios objective-c swift uilocalnotification ios10
这是当前的UILocalNotification class,这是苹果刚刚在 wwdc 16 中宣布的 iOS 10 UserNotification。
使用 UILocalNotification 的旧应用会在 iOS 10 上崩溃吗?
【问题讨论】:
标签: ios objective-c swift uilocalnotification ios10
在 iOS 10 设备上创建 UILocalNotification 对象不会导致崩溃(我刚刚使用 Xcode 8 beta 进行了尝试)。 Xcode 会警告你 UILocalNotification 在 iOS 10 中已被弃用,而应使用 UserNotifications 模块中的 UNNotificationRequest。如果您的目标是 iOS 10 及更高版本,强烈建议您迁移代码以使用 UNNotificationRequest。
【讨论】:
MFMailComposeViewController() ,您的应用就会崩溃。请参阅this 问题。