当我在下面声明代码语句时,为什么会出现此错误?
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/