5

I have a private cocoa pod which I have successfully built and included in my project.

In my project's podfile, I add it as so:

pod 'myPrivatePod', git: 'https://git.private.com/myPrivatePod.git'

My podspec file is in the root of the project, I followed the example from reachability. When I update my pod, I change version number in xcode as usual, I update the podspec version and source(tag).. I also apply the tab to git. After an update, when I do pod update / pod oudated I never get this new update. I end up having to remove the pod, doing a 'pod install' -> add pod, do 'pod install' again.. At this point I get my latest version.

I feel like I could be missing something, but I've gone through the guides with no luck.

JDM
  • 883
  • 1
  • 8
  • 20
  • Fetching a pod from a repository using `:git` will always use the latest commit on `master`: [see the documentation](https://guides.cocoapods.org/syntax/podfile.html#pod). – mAu Aug 18 '15 at 13:51
  • I've been staring at that link for a while... So if I don't specify a tag, it will not use what the podspec tells it to use? Either way, it still does not get the latest commit. It's simply not fetching any changes unless I remove the pod and re-add it.. – JDM Aug 18 '15 at 13:55
  • Also - Looking at the Cedar ios example, I have the same setup.. But that one does pick up the updates just fine - using the tag specified in the podspec file for the project... pod 'Cedar', git: 'https://github.com/pivotal/cedar.git' https://github.com/pivotal/cedar/wiki/Installation – JDM Aug 18 '15 at 14:00
  • What happens if you run `pod install --verbose`? – mAu Aug 19 '15 at 06:11
  • Nothing usefull, goes through these steps.. I actually just made a change in my pod, pushed it and did pod install. it didnt' come through. It doesn't show anything different when it's in the "finding podfile changes" – JDM Aug 19 '15 at 17:26
  • Edit - Loos like a pod update now works and updated my podfile.locl... Not sure what I did(if anything) – JDM Aug 19 '15 at 17:34

2 Answers2

2

You never got the update because you should clean the cache of cocoapods :

pod cache clean --all

After that, just call the usual pod update and it should work.

Loegic
  • 3,390
  • 20
  • 33
1

I'm using

pod 'MyLib', :git => 'ssh:path.git', :branch => 'develop' //will fetch last commit of develop branch

pod 'MyLib', :git => 'ssh:path.git', :branch => 'master' //will fetch last commit of master branch

pod 'MyLib', :git => 'ssh:path.git', :commit => '7b1790e' //will fetch a specified commit

You could get more there https://guides.cocoapods.org/using/the-podfile.html

Community
  • 1
  • 1
Mike Demidov
  • 1,117
  • 11
  • 20