CoreData + MagicalRecord.h file not found
I'm stuck with a pretty simple search error, but I can't seem to solve it.
I am trying to add MagicalRecord to my project using this tutorial, but after adding #import "CoreData+MagicalRecord.h"
to prefix.pch I get CoreData+MagicalRecords.h file not found error
.
I've also tried #import <MagicalRecord/MagicalRecord.h>
this but the same error.
What could be the problem.
UPDATE:
Add my prefix code here.
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "Constants.h"
#define MR_SHORTHAND
#import "CoreData+MagicalRecord.h"
#endif
source to share
This may not be directly related to the original problem of the question, but it might come in handy.
If you are using Magical Record 2.3 beta 6 or later, there seems to be an issue with manual imports that have not been sorted due to issues. See https://github.com/magicalpanda/MagicalRecord/issues/1019 (thought the related issue claims it fixed it, I ask you to distinguish)
I was able to get my version of the build and run guide by converting my import data from format #import <MagicalRecord/filename.h>
to #import "filename.h"
.
source to share
I had the same problem before. It sounds funny, but move #import <CoreData+MagicalRecord.h>
over #import <UIKit/UIKit.h>
. Note the use <>
instead ""
if you are using modules.
Edit Please note that this is an old answer. This has worked for me before when I posted this. This may not work anymore ... I haven't used MagicalRecord in quite some time.
source to share