ios5 - 使用未声明的标识符 'NSMigratePersistentStoresAutomaticallyOption'

标签 ios5 core-data-migration uimanageddocument

当我在下面声明代码语句时,为什么会出现此错误?

use of undeclared identifier 'NSMigratePersistentStoresAutomaticallyOption'


NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];

为了让它识别我的 NSMigratePersistentStoresAutomaticallyOption 常量,我缺少什么?

谢谢,

麦克风

最佳答案

NSMigratePersistentStoresAutomaticallyOption 在 NSPersistentStoreCoordinator.h 中声明。您确定在构建字典的任何地方都包含或转发了它(例如包含 CoreData.h)?

关于ios5 - 使用未声明的标识符 'NSMigratePersistentStoresAutomaticallyOption',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9605170/

相关文章:

ios - Storyboard中的 UIGestureRecognizer 可以使用多个 View 吗?

asihttprequest - iOS 5 卡在 ASIHTTPRequests 上

iphone - 我应该如何迁移我的核心数据?

ios - 如何访问mod包中的mom文件?

ios - Core Data 的线程错误

core-data - UIManagedDocument - 如何处理 UIDocumentStateSavingError?

iphone - 如何在 iOS 5 中在耳机和扬声器上播放单独的音频

ios - 我有一个 2 按钮 UIAlertView,我怎么知道按下了哪个按钮?

iphone - Core Data轻量级迁移崩溃

iOS 7 : What happened to UIDocument/UIManagedDocument and iCloud?