1

I am trying to add SwiftCharts to create a bar chart in my project, and after watching a bunch of tutorials and trying multiple things it still isn't working.

As of now, the SwiftCharts.xcodeproj is embedded in my project. The SwiftCharts.framework is selected in the Embedded binaries and Linked Frameworks andLibraries. In my code I use this: import SwiftCharts but I get the error :

No Such Module 'SwiftCharts'

What am missing? Thanks for the help.

ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
StefWG
  • 61
  • 1
  • 9

1 Answers1

3

Please make sure you have done the following:

  1. You made your project pod aware. Run "pod init" in your project dir.
  2. You have added this to your PodFile: use_frameworks! pod 'SwiftCharts', '~> 0.4'
  3. ran "pod install" to install the SwiftCharts

And most importantly open the "workspace file" not the "project file" with Xcode.

Wayne
  • 3,359
  • 3
  • 30
  • 50
  • Do I do the pod init in terminal? – StefWG Aug 12 '17 at 16:29
  • Yes, within your project directory, do a pod init if you have not done so already, then after that you need to configure your Podfile to tell it what pods you want, in this case add this "use_frameworks! pod 'SwiftCharts', '~> 0.4'", then after that install the pod by running pod install. Then the last thing is to open the workspace file that was generated, the workspace will include the Pod projects as well as your project. – Wayne Aug 12 '17 at 17:56