1

how do i stop the re-installing of old pods on new pod install.

old pod was 1.0.0, updated pod is 1.1.1

pod install --no-repo-update ----> Re-creating CocoaPods due to major version update.

for example: pod file: pod 'Alamofire', '~> 3.3'

Installing Alamofire (3.5.1) --> prevent this from installing on pod install

iSwift
  • 314
  • 3
  • 17

1 Answers1

2

If you want a specific version, don't use compatibility operator ~>, just provide the version:

pod 'Alamofire', '3.3.1'

This means that you only want this, and no other version. By specifying '~> 3.3', you are saying that you want any version that's compatible, which essentially is 3.x.y. You can read more on semantic versioning here: http://semver.org.

kkodev
  • 2,557
  • 23
  • 23
  • well the answer is correct, but it still is installing the same old pod library, and i dont know currently which version am using in 3.x.x. is there any way to only install the new library without touching the old library? – iSwift Jul 18 '17 at 10:18
  • Check `Podfile.lock` to figure out which version you are currently using. Also if you check in `Podfile.lock` into your repository, `pod install` won't actually install anything new, it'll pull cached version of the library, which should make no change and is fast. – kkodev Jul 18 '17 at 12:49
  • Correct, it should have not installed, i didn't had this problem on previous pod version, i guess due to update of pod to 1.1.1 from 1.1.0 made this major version update? I guess its not accessing the cached versions. – iSwift Jul 19 '17 at 11:57