Xcode warnings with Cocoapods (MR_SHORTHAND) #652

Bruno-Furtado opened this Issue Jan 25, 2014 · 21 comments


None yet

Xcode displays warning messages

Probably these are presented because I'm using Cocoapods.
As Cocoapods uses a separate .xcodeproj, he is not able to find the #define MR_SHORTHAND add in Prefix file of my project.



  • Undeclared selector shouldImport:
  • Undeclared selector willImport:
  • Undeclared selector MR_valueForUndefinedKey:
  • Undeclared selector didImport:


  • Undeclared selector entityInManagedObjectContext:
  • Undeclared selector insertInManagedObjectContext:


  • Xcode 5.1 (5B90f)
  • Deployment Target: 6.0
  • Base SDK: 7.1
  • Valid Architectures: arm64, armv7, armv7s

Same issue


Yeah, just ran into this as well. Have tried to make some of the changes suggested in older issues to no avail.

@tonyarnold tonyarnold added this to the 3.0 milestone Feb 8, 2014
@tonyarnold tonyarnold added the Bug label Feb 8, 2014
@tonyarnold tonyarnold self-assigned this Feb 8, 2014

Same for me as well. Happened after running Pod update related to another package, and MagicalRecord got reinstalled. Now shorthands doesn't work anymore.


@thomassnielsen have a look at #665 for a solution to your issue (use MagicalRecord/Shorthand rather than MagicalRecord in your Podfile).


@tonyarnold thanks! Saved me so much time.

colasbd commented Feb 21, 2014

I don't want to use Shorthand but still have the warnings.
I have s.dependency 'MagicalRecord', '~> 2.2' in my .podspec.

Is there any way to get around?


No, there's no way around this at this point in time, unless you want to modify MagicalRecord yourself.

The two methods being referenced in NSManagedObject+MagicalRecord.m come from mogenerator — given how widely it's deployed, MagicalRecord looks for those methods and uses them if they're available. We'll sort out the NSManagedObject+MagicalDataImport.m methods in a future release (probably by declaring them part of an informal protocol as suggested in another issue).


The same issue seems to be present with #define MR_ENABLE_ACTIVE_RECORD_LOGGING 0. Any similar fixes for this?

pomin commented Mar 17, 2014

i had changed my podfile to MagicalRecord/Shorthand, but it still warnings? Any suggestions?


This is fixed in the upcoming 2.3 release. If you're keen, you're welcome to help us test it out by using the develop branch (or one of the betas posted to the Tags/Releases page here on the GitHub project homepage). Thanks for your patience.

@tonyarnold tonyarnold closed this Apr 12, 2014
akinLiu commented Apr 22, 2014

@tonyarnold when 2.3 release?


@akinLiu when it's done. There are currently 7 issues left to fix with the 2.3 release, and I'm working on them as I can. Hopefully in the next couple of weeks.

akinLiu commented Apr 22, 2014

thanks a lot

akinLiu commented Apr 23, 2014

If you use pod add inhibit_all_warnings! to Podfile at first line will fix the warning


That's a bad idea in the long run, but if it gets you through for the immediate future then that does work.


It seems to me that this issue (which I am experiencing too) can be solved as shown in this pull request: #926
I can't be absolutely sure this way is the right way, so it would be nice to hear the opinion of the maintainers or other interested people. Thanks in advance.



is there an ETA for 2.3?


@jlnbuiles It seems that there is only one issue left till 2.3.0: https://github.com/magicalpanda/MagicalRecord/milestones/2.3.0
But I'm not sure whether any other issues may be added to the list.


Hopefully there are no more issues for 2.3.0. I haven't made time to reproduce the remaining bug, but once that's resolved I'd be happy to release.

pavm035 commented Mar 6, 2015


Even i'm facing the same issue, and i would like to understand what is the current MagicalRecord version to use in pod?. By default it comes with 2.2 but i see several branches here with tag release/3.0 and so, would you please help me to get out of these issues?

Thanks in advance


Having the same issue here

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