Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

MR_SHORTHAND does not works! #130

Closed
darvin opened this Issue · 7 comments

7 participants

@darvin

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

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

@raid5

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

@marcoow

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
@blackgold9
Collaborator

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

@blackgold9 blackgold9 closed this
@rcabamo

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.

@tonyarnold
Owner

Please refer to issue #665.

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

@shto

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
Something went wrong with that request. Please try again.