Search code examples
iosobjective-ccocoapodsios-charts

How can I import Charts.xcodeproj using cocoapods?


I'd like to use ios-charts on my iOS App written in Objective-C, and tried to fetch it from cocoapods.

My Podfile is

platform :ios, "9.0"
use_frameworks!

target 'MyApp' do
  pod 'FMDB', '~> 2.0'
  pod 'Charts', '~> 2.1'
end

I could retrieve Charts, but couldn't find 'Charts.xcodeproj'.

Reading README.md, it says

Drag the Charts.xcodeproj to your project

But I couldn't find that file.

Does anybody know how to get 'Charts.xcodeproj' using cocoapods?


Solution

  • If you decide to intregrate the library with CocoaPods , put your Podfile on the same folder of your .xcodeproj project,then open a terminal ,navigate to that path and write:

    pod install
    

    After installation completes,close Xcode and open your newly created .xcworkspace file. Be careful: don't open your .xcodeproj but open .xcworkspace instead.

    To use your newly imported files just do:

    @import Charts; // put this in the class where you want to use Charts!