Push notification 对于';没有可见的@界面;UIC应用程序';声明选择器';登记处说明:';AppDelegate.m
我刚切换到xcode 6和ios8,我正试图修复一些警告。警告是关于一些不推荐使用的方法。因此,我在AppDelegate.h中更改了推送通知的代码,使其与iOS 8一起工作,但出现了错误 旧代码(xcode 5,iOS7) iOS8的新代码Push notification 对于';没有可见的@界面;UIC应用程序';声明选择器';登记处说明:';AppDelegate.m,push-notification,ios8,xcode6,appdelegate,Push Notification,Ios8,Xcode6,Appdelegate,我刚切换到xcode 6和ios8,我正试图修复一些警告。警告是关于一些不推荐使用的方法。因此,我在AppDelegate.h中更改了推送通知的代码,使其与iOS 8一起工作,但出现了错误 旧代码(xcode 5,iOS7) iOS8的新代码 [[UIApplication sharedApplication] registerForRemoteNotifications: (UIUserNotificationTypeBadge | UIUserNotificationTypeSou
[[UIApplication sharedApplication] registerForRemoteNotifications:
(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
如何解决此错误?请阅读文档。这不是如何使用注册表进行删除的方法。您可以使用适当的设置调用
注册表通知设置:
,最后调用[[UIApplication sharedApplication]注册表通知]代码>以注册
[[UIApplication sharedApplication] registerForRemoteNotifications:
(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];