MR_SHORTHAND does not works! #130

Closed
darvin opened this Issue Jan 15, 2012 · 7 comments

Comments

Projects
None yet
7 participants

darvin commented Jan 15, 2012

my prefix:


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

    #import <CoreData/CoreData.h>

    #define MR_SHORTHAND
    #import "CoreData+MagicalRecord.h"
#endif

raid5 commented Jan 25, 2012

I'm having similar issues. No known class method for selector 'findAll'

raid5 commented Jan 26, 2012

Nevermind, it all seems to be working for me now by defining #define MR_SHORTHAND 1 before #import "CoreData+MagicalRecord.h"

marcoow commented Apr 19, 2012

for me it's not working, my PCH looks like that:

#import <Availability.h>

#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif

#define MR_SHORTHAND 1

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "CoreData+MagicalRecord.h"
#endif
Member

blackgold9 commented Sep 23, 2012

This works for me. If you have more information, please let me know

blackgold9 closed this Sep 23, 2012

rcabamo commented Feb 10, 2014

I have the same issue. My .pch is:

#import <Availability.h>

#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <SystemConfiguration/SystemConfiguration.h>
    #import <MobileCoreServices/MobileCoreServices.h>

    #import <Mantle/Mantle.h>

    #import "NotNullAdditions.h"

    #import "UIViewController+APICLientAddition.h"
    #import "UIViewController+BluetoothManagerAdditions.h"

    // CocoaLumberjack config
    #import "DLog.h"

    #define MR_SHORTHAND
    #import <MagicalRecord/CoreData+MagicalRecord.h>
#endif

And the app crashes in this line User *user = [[User findAllWithPredicate:[NSPredicate predicateWithFormat:@"serverID == %@", serverID]] lastObject];

Any idea?

Thanks.

Contributor

tonyarnold commented Feb 10, 2014

Please refer to issue #665.

Shorthand syntax is not enabled by default. Change MagicalRecord to MagicalRecord/Shorthand in your Podfile.

shto commented Oct 31, 2014

Using MagicalRecord/Shorthand in my Podfile has solved this problem for me. Thanks!

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