我无法解决此问题,我正在迁移版本1.2到2.0
(Node 2 [Node 3 [], Node 4 []])
答案 0 :(得分:1)
我会将注册方法转移到if语句中:
if #available(iOS 8.0, *) {
let ns = UIUserNotificationSettings(forTypes: [UIUserNotificationType.Sound, UIUserNotificationType.Alert, UIUserNotificationType.Badge], categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(ns);
} else {
// Fallback for earlier iOS versions
};