metadataForPersistentStore:
現在ストアしている、又は永続ストアにストアしようとしているメタデータの内容の辞書を返します
-(NSDictionary *)metadataForPersistentStore:(id)store:
解説
現在ストアしている、又は永続ストアにストアしようとしているメタデータの内容の辞書を返します。
返り値
( NSDictionary * )
なし
引数
( id )store
フレームワーク
CoreData
クラス
NSPersistentStoreCoordinator
Instance Methods
使用可能
10.4
参照
-metadataForPersistentStoreWithURL:error:
-setMetadata:forPersistentStore:
例文
NSPersistentStoreCoordinator *psc = [[self managedObjectContext] persistentStoreCoordinator]; id pStore = [psc persistentStoreForURL:oldURL]; if (pStore != nil) { NSMutableDictionary *metadata = [[psc metadataForPersistentStore:pStore] mutableCopy]; [metadata setObject:[NSArray arrayWithObject:@"Version 1"] forKey:@"Version"]; [psc setMetadata:metadata forPersistentStore:pStore];