我想在我的iOS应用程序中使用通知。我阅读了很多教程,并使用了这个:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
我的代码如下:
var types: UIUserNotificationType = UIUserNotificationType.Badge |
UIUserNotificationType.Alert |
UIUserNotificationType.Sound
var settings: UIUserNotificationSettings = UIUserNotificationSettings( forTypes: types, categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
我收到了这个错误提示: 应用程序中没有找到有效的'aps-environment'授权字符串
我进行了大量搜索并尝试了所有可能的解决方案,重新尝试了很多次,但是仍然没有改变!