我已将程序配置为接收来自Parse的通知,并且我已使用以下行启用它:
var pushSettings : UIUserNotificationSettings = UIUserNotificationSettings(forTypes: .Alert, categories: nil)
application.registerUserNotificationSettings(pushSettings)
application.registerForRemoteNotifications()
let userNotificationTypes = (UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound);
let settings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
声明在
中func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
来自我的appDelegate,但是当我关闭我的程序并重新启动它时,所有参数都被重置,我将它们“关闭”
有没有人有想法?