3

I am using Xcode 8.3 and swift 3. In order to use charts library, I need to use Charts 3.0.2 but Cocoapods is always installing the latest library.

I tried following commands -

pod install
pod update

but none are working. Here is the screenshot enter image description here

Shunan
  • 3,165
  • 6
  • 28
  • 48
  • Try removing the line from podfile, pod install, add it back again, and pod install again. – Sweeper Apr 11 '18 at 06:31
  • I tried that otherwise, it would have shown 'using Charts (3.0.5)' instead of installing Charts(3.0.5) – Shunan Apr 11 '18 at 06:34

1 Answers1

12

By trial and error, I figured out that removing the ~> thingy works, so now your line will look like:

pod 'Charts', '3.0.2'

And then you need a pod update, and this will show up:

Installing Charts 3.0.2 (was 3.0.5)
Sweeper
  • 213,210
  • 22
  • 193
  • 313
  • Thanks, @Sweeper. It worked but do you have any idea what ~> this thing means or what its called. – Shunan Apr 11 '18 at 07:01
  • @Shubh See here: https://stackoverflow.com/questions/20213751/what-is-the-usage-of-in-cocoapods – Sweeper Apr 11 '18 at 07:06
  • @Sergio This is not Xcode's fault. This is due to cocoa pod's design. – Sweeper Jun 28 '19 at 13:57
  • Yes but I need to use it for xcode. And it has to be an older version of xcode so I can compile an older project.... not fun. – Sergio Jun 28 '19 at 14:22