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

installing with cocoapods #283

Closed
peteclark3 opened this issue Aug 6, 2015 · 12 comments
Closed

installing with cocoapods #283

peteclark3 opened this issue Aug 6, 2015 · 12 comments

Comments

@peteclark3
Copy link

Hi, I've read the various issues on this topic but haven't found a solution. Closest I came was issue #87 but still didn't see a solution other than "read the instructions" which I swear I did a couple of times.. I apologize.

I simply added to my Podfile: pod 'ios-charts'

then did a pod install / pod update ..

all seems good from a building perspective, but when I try to "import Charts" at the top of my swift file I get a compiler error, "No such module 'Charts'" .. similarly if I remove that and just try to add a BarChartView, e.g. @IBOutlet weak var barChartView: BarChartView! , I get "use of undeclared type BarChartView"

Is there a step I am missing for the cocoapods installation? Tried multiple project cleans, stop and start xcode..

@xrolfex
Copy link

xrolfex commented Aug 7, 2015

You may need to make sure that you are using frameworks in cocoa pods.

@peteclark3
Copy link
Author

I was.. (I am) - gave up and installed via tutorial here: http://www.appcoda.com/ios-charts-api-tutorial/

@khanxc
Copy link

khanxc commented Jan 28, 2016

screen shot 2016-01-28 at 6 35 07 pm
Other framework in pod is working, trying to make Charts work for hours but no progress. Guidance needed
Podfile:

 platform :ios, '8.0'
use_frameworks!
target 'AppName' do

pod 'Alamofire', '~> 3.0'
pod 'Charts'

end

@jhmacdon
Copy link

jhmacdon commented May 2, 2016

I am having the same issue

@danielgindi
Copy link
Collaborator

You may want to post an Issue on the Issues page of CocoaPods. Or try to install it manually...

@apprisingapps
Copy link

It looks as if you are using Swift. If you are using Swift 3, you may need consider adding the following to your pod file.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end

@hshamji
Copy link

hshamji commented Feb 3, 2017

It worked for me - please try the following in your Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'AppName' do
pod 'Alamofire', '~> 4.3.0'
pod 'Charts'
end

@elchris78
Copy link

I've been dealing with the same problem since 2 days ago, with no success so far though!
I'm trying to make this work with cocoapod, tried your solution @h-sha but not a positive result.
Heres my problem:
screen shot 2017-02-21 at 1 50 11 pm

@pmairoldi
Copy link
Collaborator

Seems like you added all the files to your project? Please open another issue if you haven't figured it out. This is something wrong with your setup and isn't related with this issue

@TheTiger13
Copy link

TheTiger13 commented May 28, 2018

Following steps worked for me:

  1. install via cocoapods by using pod 'Charts'
  2. Now if you will try to write anything related to charts it will not read that file or class and you will see the error like use of undeclared type xxxxx. So for this GoTo ⇾ Project Target ⇾ General ⇾ Linked Frameworks and Libraries ⇾ Click on + button and add Charts.framework.
  3. Go to your class where you want to use this. import Charts and now
    you will be able to use this framework without any error.

@pmairoldi
Copy link
Collaborator

pmairoldi commented May 28, 2018

@TheTiger13 this defeats the point of cocoa pods. After doing pod install all your dependencies should automatically be linked in your project. If that is not that case you have configured something wrong in your pod file.

@TheTiger13
Copy link

TheTiger13 commented May 29, 2018

@petester42 I just took a new sample project and installed pod 'Charts' without doing anything extra. (Xcode 9.3, Swift 4.1).

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

10 participants