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

Core Plot: Unknown class CPTGraphHostingView in Interface Builder file. #491

Closed
tilowestermann opened this issue Aug 31, 2012 · 8 comments
Closed

Comments

@tilowestermann
Copy link

I'm using Core Plot via CocoaPods, but when going to a view that contains something related to this library (i.e. using a CPTGraphHostingView), I'm getting the following error:

Unknown class CPTGraphHostingView in Interface Builder file.
-[UIView setCollapsesLayers:]: unrecognized selector sent to instance
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setCollapsesLayers:]: unrecognized selector sent to instance 

Searching through the web, people are mentioning a missing "-all_load" flag. Looking at my Pods.xcconfig, there is none

OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework CoreData -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit

Any suggestion on how to fix this issue will be helpful!

Thanks in advance!

@fabiopelosin
Copy link
Member

The all_load flag should not be the issue. Can you check that the source file that implements -[UIView setCollapsesLayers:] is present in the Pods project?

Maybe some categories are missing from the source of the podspec.

@tilowestermann
Copy link
Author

That was my first guess, too. I can confirm that the source file is present in the Pods project (i.e. CPTGraphHostingView.h/.m)
I already tried removing/adding the Pod - without success.

@fabiopelosin
Copy link
Member

Strange, I think that there is something fishing going on with your integration. If the file is in the Pod project and it is added to the correct target and that target it is used by your target it should work.

@tilowestermann
Copy link
Author

I found the issue: I removed all files related to CocoaPods and did a new setup.

CocoaPods raised the following warning: [!] The target EnergyApp [Debug - Release]' overrides the OTHER_LDFLAGS' build setting defined in Pods/Pods.xcconfig'.`

However, this build setting was empty. I deleted all occurrences of "OTHER_LDFLAGS" in my project.pbxproj and now it is working again.

@alloy
Copy link
Member

alloy commented Sep 3, 2012

@tilowestermann Do you mean that the setting was being overridden on the project level, not the target level? Or was the build setting actually overridden on the target by explicitly setting it to be empty?

@tilowestermann
Copy link
Author

That is a good question! I thought that an empty setting wouldn't cause any problems (there are many empty settings right out of the box). So I don't know which setting was being overridden at which point.

@alloy
Copy link
Member

alloy commented Sep 3, 2012

@tilowestermann When the name of the setting (the left column) is written in bold, then the setting has been explicitly set. An empty value of the setting (the right column) is empty, then this will override (clear) any of the settings from higher levels. But, as you already have it working now, this is more FYI for the next time you run into build setting issues :)

@tilowestermann
Copy link
Author

Good to know, thanks! :-)

On 03.09.2012, at 20:28, Eloy Durán notifications@github.com wrote:

@tilowestermann When the name of the setting (the left column) is written in bold, then the setting has been explicitly set. An empty value of the setting (the right column) is empty, then this will override (clear) any of the settings from higher levels. But, as you already have it working now, this is more FYI for the next time you run into build setting issues :)


Reply to this email directly or view it on GitHub.

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013
changed homepage address to appropriate page
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

3 participants