macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

persistentStoreForURL:

指定された永続ストアオブジェクトを返します
-(id)persistentStoreForURL:(NSURL *)URL:

解説

指定された永続ストアオブジェクトを返します。

返り値

( id )

オブジェクト()

引数

( NSURL * )URL

クラス

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];