問題が見つかりました。 他の誰かがこの問題に直面している場合は、私の場合は解決策があります: ファイルはまだ作成されていない場合にのみデータをダウンロードするので、初めて実行したときにはまだflickrキーを入れませんでした、データを持たないファイルが作成されました。私はキーで再びアプリを実行したとき、それはすでにファイルを持っていたので、それはデータなしで(flickrのデータをダウンロードしたことはありません。
ここで私は後PhotographersTableViewControler.m
に
- (void)useDocument
{
if (![[NSFileManager defaultManager] fileExistsAtPath:[self.photoDatabase.fileURL path]]) {
// does not exist on disk, so create it
[self.photoDatabase saveToURL:self.photoDatabase.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {
[self setupFetchedResultsController];
[self fetchFlickrDataIntoDocument:self.photoDatabase];
}];
} else if (self.photoDatabase.documentState == UIDocumentStateClosed) {
// exists on disk, but we need to open it
[self.photoDatabase openWithCompletionHandler:^(BOOL success) {
[self setupFetchedResultsController];
//the next line is the only one I changed!!!!!!
[self fetchFlickrDataIntoDocument:self.photoDatabase];
}];
} else if (self.photoDatabase.documentState == UIDocumentStateNormal) {
// already open and ready to use
[self setupFetchedResultsController];
}
}
を変更するコードがあります最初にその行を削除することができます 私の誰かが私のミスから学ぶことができたら幸いです。
はい、私はそれをnoで学んだw。 tnx – litov