神奇记录MR_createEntity()返回零对象,使用快捷

问题描述:

下返回零神奇记录MR_createEntity()返回零对象,使用快捷

let entity = Data.MR_createEntity() 

我初始化神奇记录如下,日志表明正输出。

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 
    // Override point for customization after application launch. 

    MagicalRecord.setLoggingLevel(MagicalRecordLoggingLevel.Debug) 
    MagicalRecord.setupCoreDataStackWithAutoMigratingSqliteStoreNamed("proff") 

    context = NSManagedObjectContext.MR_defaultContext() 

    return true 
} 

错过了创建模型文件的步骤。 更多的核心数据的东西,而不是一个神奇的记录的东西。 一旦我创建了那个,然后生成了创建工作的swift代码。