Cannot create a managed object context on iOS

You need to import CoreData/CoreData.h in your application delegate’s header file:

#import <CoreData/CoreData.h>

Since you probably use it through outyour application you should put it in the precompiled header file, YourApp-Prefix.pch:

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <CoreData/CoreData.h>
#endif

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)