Using undeclared identifier "NSMigratePersistentStoresAutomaticallyOption"

Why am I getting this error when I declare the code below?

use of undeclared identifier 'NSMigratePersistentStoresAutomaticallyOption'

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

What am I missing to find out that my constant is NSMigratePersistentStoresAutomaticallyOption?

Thanks,

Mike

+4
source share
1 answer

NSMigratePersistentStoresAutomaticallyOption is declared in NSPersistentStoreCoordinator.h. Are you sure this is enabled or redirected wherever you build this dictionary (for example, by including CoreData.h)?

+6
source

Source: https://habr.com/ru/post/1400242/