私が書いているカレンダーアプリでは、カレンダーデータをローカルに保存しようとしています.Googlesサーバーを使用していますが、大したことはありません。 [GDataEntryCalendarEvent encodeWithCoder:]は例外を発生させます、GDataはこれをしないようです。私が使用しているコードがある -iPhone向けGDataはエンコーダを使用できません
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
int keyNum = 1;
for (NSArray *eventsInfo in [calendarData allValues]) {
NSString *theKey = [NSString stringWithFormat:@"%i",keyNum];
[archiver encodeObject:eventsInfo forKey:theKey];
keyNum ++;
}
[archiver finishEncoding];
bool success = [data writeToFile:[Directories calendarDataFilePath] atomically:YES];
[archiver release];
[data release];
bool success = [calendarData writeToFile:[Directories calendarDataFilePath] atomically:YES];
NSLog(@"Calendar Data saved: %@",success);
と私は取得しています誤りがある - [GDataEntryCalendarEvent encodeWithCoder:]:認識されていないセレクタはインスタンスに任意のヘルプ0x4d60b40
感謝を送りました!
リンクに感謝しています.GDataの資料を見つけるのが難しいと思っています。これは本当に便利です。 – SomaMan