try 在iOS 8下注册推送通知时.x:
application.registerForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound)
我得到以下错误:
registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
有什么新方法吗?当我在iOS 7上运行这个Swift应用程序时,它确实有效.十、
EDIT
On iOS 7.x when I include the conditional code I get (either SystemVersion conditional or #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000)
dyld: Symbol not found: _OBJC_CLASS_$_UIUserNotificationSettings