I have a swift app that I am bridging from the Objective C Parse framework.
It does not crash in the simulator, but push notifications don't work in the simulator.
Here is the code:
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
It crashes on the following line without a error message:
UIApplication.sharedApplication().registerUserNotificationSettings(notificationSettings)
How can I fix this?
UPDATE
I just tested it on my iPad (iOS 8) and now it is crashing there too?