Iphone 本地通知在IOS8 cordova上不起作用
通知在iOS7iPhone4上运行良好,但在iOS8iPad上不起作用 通知代码为:Iphone 本地通知在IOS8 cordova上不起作用,iphone,cordova,ios8,Iphone,Cordova,Ios8,通知在iOS7iPhone4上运行良好,但在iOS8iPad上不起作用 通知代码为: var notificationObject = { id:abc, title:'Prayer Time', message:'Dont forget to buy some flowers.', // repeat:'weekly',
var notificationObject = {
id:abc,
title:'Prayer Time',
message:'Dont forget to buy some flowers.',
// repeat:'weekly',
date:null,
json: JSON.stringify({
category: cat,start_time:startTime,end_time:endTime }
)
};
var notificationObjectMonday = jQuery.extend(notificationObject, {
date : newactualdate
});
window.plugin.notification.local.add(notificationObjectMonday);
}
//for iOS8 you need to set permission for local notifications
//Registering user notification settings,
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
// Override point for customization after application launch.
if(UIApplication.instancesRespondToSelector(Selector("registerUserNotificationSettings:")))
{
application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil))
}
else
{
//do iOS 7 stuff, which is pretty much nothing for local notifications.
}
return true