我有一個快速的應用程序,我正在橋接Objective C Parse框架。解析iOS中的應用程序崩潰<8 in swift
它不會在模擬器中崩潰,但推送通知在模擬器中不起作用。
下面是代碼:
Parse.setApplicationId("id", clientKey: "id")
let notificationTypes:UIUserNotificationType = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound
let notificationSettings:UIUserNotificationSettings = UIUserNotificationSettings(forTypes: notificationTypes, categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(notificationSettings)
UIApplication.sharedApplication().registerForRemoteNotifications()
return true
它崩潰以下行沒有錯誤消息:
UIApplication.sharedApplication().registerUserNotificationSettings(notificationSettings)
我怎樣才能解決這個問題?
UPDATE
我只是測試它在我的iPad(iOS 8的),現在實在是太崩潰呢?
您嘗試更新您的Xcode?到6.1蘋果在Swift上做了一些API更新... – eddwinpaz 2014-10-27 19:21:05