magicalpanda/MagicalRecord — Issue #76: Using MagicalRecord from a static lib (a la cocoapods)
Author: mmobarak
Created: 2011-10-17 17:33:15+00:00
State: open

Hi, and thanks for this great piece of software! I'm running into an issue, though, when using it from within a static lib:

I've used the podspec that you've submitted to cocoapods-specs to get MagicRecord integrated with my project. It builds into libpods.a and my code builds against it. At runtime I see:

2011-10-17 11:49:27.406 MyCode[85999:207] +[NSPersistentStoreCoordinator MR_coordinatorWithAutoMigratingSqliteStoreNamed:]: unrecognized selector sent to class 0x1a4cfe4
2011-10-17 11:49:27.409 MyCode[85999:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSPersistentStoreCoordinator MR_coordinatorWithAutoMigratingSqliteStoreNamed:]: unrecognized selector sent to class 0x1a4cfe4'

I've tried the combinations of the -ObjC and -all_load flags in both the Pods project and my own, but the outcome is the same. Essentially, it looks like the category code in MR isn't being found.

Have you had success getting MR working with cocoapods, and if so, do you have a recipe for XCode 4.2?

Thanks very much!