2

I want to install specific dependency using cocoapods. if I execute pod install, other dependencies are updating before installing my newly added dependency. I just want to install specific pod without touching other dependencies. And I know deleting, updating any dependency also updates others. Is there any way to solve this problem?

Actually my problem is when I myself modify some dependency and run pod install it reverts back to its original version. But I don't want to lose my changes

Any suggestion will be appreciated.

Lorenzo
  • 3,293
  • 4
  • 29
  • 56
santosh
  • 77
  • 1
  • 8

1 Answers1

-1

Make sure that Podfile.lock is in the same folder as Podfile is.

Add a line in the Podfile

pod 'MBProgressHUD','~> 0.9'

cd to your project and use the following line in the Terminal, it'll install just the above pod you specified.

pod install podName

From official website here's the link!

Running pod install will install the current version of RestKit, causing a Podfile.lock to be generated that indicates the exact version installed (e.g. RestKit 0.10.3). Thanks to the Podfile.lock, running pod install on this hypothetical project at a later point in time on a different machine will still install RestKit 0.10.3 even if a newer version is available. CocoaPods will honour the Pod version in Podfile.lock unless the dependency is updated in the Podfile or pod update is called (which will cause a new Podfile.lock to be generated). In this way CocoaPods avoids headaches caused by unexpected changes to dependencies.