persistentStoreForURL:
指定された永続ストアオブジェクトを返します
-(id)persistentStoreForURL:(NSURL *)URL:
解説
指定された永続ストアオブジェクトを返します。
返り値
( id )
オブジェクト()
引数
( NSURL * )URL
フレームワーク
CoreData
クラス
NSPersistentStoreCoordinator
Instance Methods
使用可能
10.4
参照
-persistentStores
-URLForPersistentStore:
例文
NSURL *oldURL = [NSURL fileURLWithPath:@"/Users/oomori/Desktop/aaa.binary"]; NSURL *newURL= [NSURL fileURLWithPath:@"/Users/oomori/Desktop/abc.sql"]; NSError *error = nil; id xmlStore = [psc persistentStoreForURL:oldURL]; id sqLiteStore = [psc migratePersistentStore:xmlStore toURL:newURL options:nil withType:NSSQLiteStoreType error:&error];