Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

MagicalRecordShorthand.h doesn't compile on Mac with MR_SHORTHAND macro defined. #121

Merged
merged 2 commits into from Dec 29, 2011

Conversation

Projects
None yet
2 participants
Contributor

tonyxiao commented Dec 29, 2011

Fixed it with pre-compiler to check for target platform. Also updated readme.md

@ghost ghost pushed a commit that referenced this pull request Dec 29, 2011

@casademora casademora Merge pull request #121 from tonyxiao/master
MagicalRecordShorthand.h doesn't compile on Mac with MR_SHORTHAND macro defined.
eb4aaec

@ghost ghost merged commit eb4aaec into magicalpanda:master Dec 29, 2011

@ghost

ghost commented Dec 29, 2011

Sweet, thanks for the code!

Contributor

tonyxiao commented Dec 29, 2011

Not at all, actually thanks you so much for the awesome framework! It's really funny cuz I started writing an abstract subclass of NSManagedObject with findAll, findByAttribute and all that goodies until I came across your blog post. This might sound weird but I was so excited to discover that [NSManagedObjectContext MR_contextForCurrentThread] is used as default with the MagicalRecord methods are called without inContext: argument :) Actually on that note the main documentation claims that it uses [NSManagedObjectContext MR_defaultContext], I'll go correct that and submit a pull request.

By the way, is there any special reason that in different places of the project sometimes #if TARGET_OS_IPHONE is used and other times #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR is used? I was thinking of defining something like #define MR_TARGET_IOS TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR to make everything consistent. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment