localNotifications
アプリがバックグラウンドに移行する前に、スケジュールをすべて保存したいと考えています。
localNotification
からすべてを取得し、次のUIApplication
ように保存しようとします:
NSArray *allNot =[[UIApplication sharedApplication] scheduledLocalNotifications];
UILocalNotification *not = [allNot objectAtIndex:0];
[[NSUserDefaults standardUserDefaults] setObject:not forKey:@"notifications"];
[[NSUserDefaults standardUserDefaults] synchronize];
今、問題が発生します。
クラス 'UIConcreteLocalNotification' の非プロパティ値を挿入しようとしています。
my からローカル通知[UIApplication sharedApplication] scheduledLocalNotifications]
を取得すると、 の配列を取得しUIConcreteLocalNotification
ます。問題は、UILocalNotification
は準拠していますがNSCoding
、このオブジェクトUIConcreteLocalNotification
は準拠していないことです。
どうすればこれを修正できますか?