I use MagicalRecords but by some reason MR_SHORTHAND does not work for me.
I have added these lines below to Prefix.pch
#define MR_SHORTHAND
#import "CoreData+MagicalRecord.h"
In case when app calls + createEntity method the app terminates due unrecognized selector. But if I write MR_createEntity everything works fine.
Team *team = [Team MR_createEntity]; // This line works
but
Team *team = [Team createEntity]; // This line does not work
with reason: '+[Team createEntity]: unrecognized selector sent to class 0x74b8c'
I know we haven't announced it publicly prior to this answer, but we've decided to deprecate shorthand support, and remove it in the upcoming MR3 release.
Shorthand support is an interesting idea and feature, but it is not something we want to maintain. We would rather focus our efforts on getting the data centric part of MagicalRecord to be as solid and reusable as possible.
That said, you're certainly welcome to fix it yourself and submit a patch to the older branch of MagicalRecord. Some things to look at are:
According to the official guide https://github.com/magicalpanda/MagicalRecord/blob/master/Docs/Installing-MagicalRecord.md
You have to call
[MagicalRecord enableShorthandMethods];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With