[英]Redirect to notification setting directly from iOS app that having support of iOS8+
[英]App not showing in Notification Center for IOS8+
我正在使用正在使用Urbanaisrship推送通知的Cordova应用程序。
当我将构建版本加载到具有版本(7.1)的iPhone-4时,可以在设备设置->通知中心中看到我的应用。
但是,当我将相同的内置版本加载到其他具有8.2版的设备Iphone 5s时,我的应用程序不会显示在设置->通知中心中。
因此,任何伙伴都可以告诉我IOS 8.2版怎么了?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//other code
// add this piece of code
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]];
[application registerForRemoteNotifications];
}
}
将这段代码添加到您的appdelegate文件中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.