现在我正在尝试调整我的应用程序以适应这些变化,遵循this let center = UNUserNotificationCenter.current() 给我一个错误: Type UNUserNotificationCenterhas no member current, swift 2.3 我知道该教程可能是为swift3编写的。但我需要让它在swift 2.3中工作。这是可行的吗?如果可行,怎么做?
我目前正在将我的应用程序从Objective-C重写到Swift,并致力于通知。由于某些原因,Swift版本的应用程序不会收到任何远程推送通知,而Objective-C版本会。下面是我用来在AppDelegate中注册通知的代码: let options: UNAuthorizationOptions= [.badge, .alert, .sound]
U