2014-12-24 2 views
0

통지가 IOS7(iPhone 4)에 완벽하게 작동한다 iOS8의의 코르도바에서 작동하지 않습니다하지만 IOS8 (iPad) 알림 코드에 작동하지 않는 것은 :지역 알림

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); 

답변

0
//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 

}