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

After installing YOLOKit with Cocoapods methods are not found #11

Closed
mac-cain13 opened this issue Aug 18, 2014 · 5 comments
Closed

After installing YOLOKit with Cocoapods methods are not found #11

mac-cain13 opened this issue Aug 18, 2014 · 5 comments

Comments

@mac-cain13
Copy link

Just added YOLOKit to my project using Cocoapods and imported YOLO.h, but XCode keeps complaining that the methods can't be found:

IGAPI.m:61:18: Property 'each' not found on object of type 'NSArray *'

When I comment out the #ifdef YOLO_EACH in YOLO.h everything works fine. It seems like XCode is not correctly setting the pre-compiler definitions correctly.

Any idea what's going wrong in my project? Other Pods don't seem to have these problems.

@mxcl
Copy link
Owner

mxcl commented Aug 18, 2014

What's your pod line?

The YOLOKit target will contain all the defines that enable all features. Sounds like the yolo target's xcconfig is not being included into your main project properly. This is hard to debug, so I'd just import the YOLO-all.h header rather than do xcodeproj surgery.

@mac-cain13
Copy link
Author

The xcconfig itself looks good, I see the YOLO... definitions there and at a glance I don't see anything strange. But I use multiple targets in my project, so maybe it has something to do with that. PromiseKit #ifdefs also don't work correctly, so maybe it's something with that.

For now I'll solve it using YOLO-all.h, thanks for that suggestion! If I find a real solution I'll comment it here.

My Podfile for reference:

platform :ios, "7.0"

target "MyApp" do

link_with 'TargetNL', 'TargetBE', 'OtherTarget'

pod "PromiseKit/CLLocationManager", "~> 0.9"
pod "PromiseKit/NSURLConnection", "~> 0.9"
pod "PromiseKit/Promise", "~> 0.9"
pod "PromiseKit/When", "~> 0.9"

pod "AFNetworking", "~> 2.3"
pod "UIColor+Hex", "~> 1.0"
pod "PureLayout", "~> 1.0"
pod "Raygun4iOS", "~> 1.4"
pod "IGDigest", "~> 1.1"
pod "YOLOKit", "~> 11"

end

target "MyAppTests" do

end

@mac-cain13
Copy link
Author

Found the problem! I have a custom .xcconfig for my targets, these define their own GCC_PREPROCESSOR_DEFINITIONS value. It seems that you can't append values to a variable when including multiple xcconfig files, they will always override each other.

So it's a cocoapods/xcconfig problem, will open a issue over there to discuss how to handle this case! Thanks for your reply!

@mxcl
Copy link
Owner

mxcl commented Aug 20, 2014

Hmm that sucks, if you don’t mind tagging me in the post or posting a link here I'd be interested to read the thread and maybe adjust things this end.

PromiseKit has individual headers at least, so in that case there is an alternative.

@mac-cain13
Copy link
Author

This issue is exactly describing what I'm running into. The workaround I used for now makes inheriting 2 xcconfigs possible. All pods especially YOLOKit and Promisekit work like charm now!

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