CocoaPods CorePlot install shows missing frameworks and missing files
Asked Answered
C

1

7

I am new to CocoaPods, and I'm trying to install CorePlot with this line in my Podfile:

 platform :ios, "7.0"
 ...
 pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git'

When I open the .xcworkspace file following installation the CorePlot shows missing frameworks. I installed these linked binaries into my Xcode project, but this did not resolve the problem. Within the CorePlot target there does not seem to be a separate way to install the frameworks.

frameworkinstalled

This is not the only problem. When I try to reference files within the CorePlot library, I get a file not found error even though I can see the files within the CorePlot target:

I tried the following import statements:

#import "CorePlot-CocoaTouch.h"
#import <CorePlot-CocoaTouch.h>
#import <CorePlot/CorePlot-CocoaTouch.h>
#import "CorePlot/CorePlot-CocoaTouch.h"

All result in the same error.

filenotfound

I don't know whether these problems are related. What should I be checking and what might have gone wrong? Here's what I've looked at:

https://github.com/core-plot/core-plot/issues/163

I'd appreciate any troubleshooting tips or explanations as to what's going on. Thanks.

Here is my full Podfile:

platform :ios, '7.0'

target 'CorePlotTestDo-OverTests' do
pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git'
pod 'AFNetworking', '~> 2.5'

end

I did not save the output when I initialized the pod, but here's the output from pod update:

Update all pods
Analyzing dependencies
Pre-downloading: `CorePlot` from `https://github.com/core-plot/core-plot.git`
Downloading dependencies
Using AFNetworking (2.5.4)
Installing CorePlot 1.6 (was 1.6)
Generating Pods project
Integrating client project
Cableway answered 19/6, 2015 at 15:12 Comment(7)
I wouldn't worry about the missing frameworks. Mine look the same and the app builds without any issues. As for importing CorePlot-CocoaTouch.h, try importing it as CorePlot/CorePlot-CocoaTouch.hRecuperate
@Recuperate thanks for the tip. I should have mentioned that I did try that import statement as well. I'll update my question.Cableway
Try it with "" instead of <>. Also, check if there's a folder called Public Headers in the CorePlot Pod folder, you might be trying to import a private header (though the file you are trying to import makes sense to me)Recuperate
@Recuperate I tried that import statement, also didn't work (updated my question). There is no folder called Public headers. The folders inside CorePlot Podfolder are: Frameworks>iOS, Pods>CorePlot (This has the .h file I'm trying to access), Products, and Targets>Pods-CorePlotTestTestsCableway
Sorry, I'm out of ideas. Maybe try cleaning and building again?...Recuperate
@Recuperate thanks a lot, I do appreciate your help. I have tried cleaning and rebuilding, restarting my computer, etc. Will let you know if I figure anything out.Cableway
please check and verify my answerGriqua
T
0

The angle bracket syntax for imports is for headers in frameworks. CocoaPods uses static libraries, so you need to use the other syntax.

#import "CorePlot-CocoaTouch.h"

I just tried a clean Core Plot install using the podfile settings in the question above. It worked fine with CocoaPods 0.37.1 and Xcode 6.3.2. Make sure your copy of CocoaPods is up-to-date.

Trainload answered 20/6, 2015 at 21:49 Comment(5)
Thanks for taking a look. I just tried to do the whole thing fresh since you said it worked, but I have the same result. Trying #import "CorePlot-CocoaTouch.h" still gives the "file not found" error. Also I only just started using CocoaPods and installed it the day I posted the question, so it should not be out of date. I am working with Xcode 6.2. Also this time I installed AFNetworking as well as Core Data. The AFNetworking install is fine - it's not showing any file not found errors. Also I just tried opening with Xcode 6.4, and this shows the same error.Cableway
Does CocoaPods show any errors when you update? Can you post the whole pod file?Trainload
Have updated my answer to show the podfile and message when running pod update. I did not save the output when I initialized the pod, but there was no error message. Also just now when I tried to update with ios 8, I got an error "malformed string" but I set the version to 7.0 and then the update went through. It did not make a difference to the missing file error. Also I have had problems specifically with CorePlot in the past. When I worked with someone else on a shared Xcode project, we manually installed CorePlot. I often had missing file errors but my friend didn't.Cableway
Have you tried using the release pod rather than pulling from GitHub? pod 'CorePlot', '~>1.6'Trainload
yes I tried that as well with multiple versions of CorePlot (1.4 through 1.6), and had the same result. My only other guess is perhaps it has something to do with low disk space on my computer. I'm reformatting today to see whether that makes the difference.Cableway

© 2022 - 2024 — McMap. All rights reserved.