Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including CoreParse in an ARC-enabled iOS project is not trivial #20

Closed
ratkins opened this issue Sep 27, 2012 · 2 comments
Closed

Including CoreParse in an ARC-enabled iOS project is not trivial #20

ratkins opened this issue Sep 27, 2012 · 2 comments

Comments

@ratkins
Copy link

ratkins commented Sep 27, 2012

I'm new to Xcode and iOS and the procedure to add CoreParse into my iOS project is not straightforward. When I do the basic stuff I am still getting linker errors, I believe because of CoreParse's use of categories.

Step-by-step instructions on how best to do this would be helpful.

@beelsebob
Copy link
Owner

First, so you don't go chasing down allys with nothing at the end – ARC has nothing to do with this at all, ARC and non-ARC code can be linked with each other with no issues at all.

In order to diagnose what your issue is, I need to see what the linker errors are. Could you post them? Using CoreParse in an iOS project should simply be a matter of adding the .a to the project, putting the .hs in a place where Xcode can find them (probably adding a header search path), and setting -ObjC -all_load in your other linker flags. The last step there may not be necessary even in modern ObjC land.

@ratkins
Copy link
Author

ratkins commented Sep 28, 2012

This is the crux of my problem: I'm sure linking ARC with non-ARC code will work if you know how, I just don't know how :-).

I've done as you said and added CoreParse's .a files to my project, added a header search path and set -ObjC as a linker flag (you're right, according to the comments on this answer http://stackoverflow.com/a/2615407/17294, -all_load is no longer necessary.) My original problem has gone away, now I'm getting the following:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM map:]: unrecognized selector sent to instance

So it seems the NSArray+Functional.m isn't being linked in.

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

No branches or pull requests

2 participants