Ios5 使用未声明的标识符';NSMigratePersistentStoresAutomaticallyOption';

Ios5 使用未声明的标识符';NSMigratePersistentStoresAutomaticallyOption';,ios5,core-data-migration,uimanageddocument,Ios5,Core Data Migration,Uimanageddocument,当我在下面声明代码语句时,为什么会出现此错误 使用未声明的标识符“NSMigratePersistentStoresAutomaticallyOption” 为了让它识别我的NSMigratePersistentStoresAutomaticallyOption常量,我缺少了什么 谢谢 MikeNSMigratePersistentStoresAutomaticallyOption在NSPersistentStoreCoordinator.h中声明。你确定在你建立字典的任何地方都会包含或转发这些

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

使用未声明的标识符“NSMigratePersistentStoresAutomaticallyOption”

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

谢谢


Mike

NSMigratePersistentStoresAutomaticallyOption在NSPersistentStoreCoordinator.h中声明。你确定在你建立字典的任何地方都会包含或转发这些信息吗(比如包括CoreData.h)?

:)这正是我所缺少的#导入有用的问题。我今天也犯了同样的错误。啊。谢谢你。
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];