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

runtime error looking for a NSString addition #9

Open
gingersman opened this issue Oct 25, 2011 · 1 comment
Open

runtime error looking for a NSString addition #9

gingersman opened this issue Oct 25, 2011 · 1 comment

Comments

@gingersman
Copy link

I just installed the iOS framework to my project and I created a WNClient and a WNRandomWordRequest to retrieve a random word. The code compiles fine.

At runtime it seems that the method wn_stringByAddingURIPercentEscapes does not exist. I suppose is an addition to the NSString class that is missing. What did I do wrong?

Here is the error I got

[__NSCFString wn_stringByAddingURIPercentEscapes]: unrecognized selector sent to instance 0x84a1c90
2011-10-25 17:47:28.824 Cocos2DTest[4885:10d03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString wn_stringByAddingURIPercentEscapes]: unrecognized selector sent to instance 0x84a1c90'

Thanks a lot!

@jonzhan
Copy link

jonzhan commented May 30, 2012

I guess this might be a little late to help the original poster out, but just in case anybody else is facing the same challenge:

You need to hop into your target build settings and add the "-ObjC" linker flag under "Other Linker Flags". This tells XCode to link Objective-C categories that it finds inside your static library.

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

No branches or pull requests

2 participants