I've discovered a serious problem in the AdMob podspec, and I am attempting to push an update to it to fix said problem. I am the "owner" of this podspec (i.e. it shows up when I do a pod trunk me.)
According to the guide, in the "How do I update an existing Pod?" section, the procedure for updating an existing pod should be as follows:
pod spec lint to check for errors.pod trunk push NAME.podspecI have done all of the above, the Podfile passes lint perfectly, however when attempting to pod trunk push it, I am getting the error "Unable to accept duplicate entry for: Google-AdMob-Ads-SDK (6.12.0)"
What am I doing wrong?
You cannot update an already existing version with pod trunk, you can only release a new one.
Fair enough. Then is the procedure for updating an already-existing pod the same as it always was (fix it in my own fork of the Cocoapods repo and submit a pull request)? If so then the documentation link I referenced above should probably be changed, since it states that pod trunk push is how this is done.
Yes, if you have a serious issue with an existing version, you can submit a PR. The guide's update section is rather about adding a new version, but I agree that it can be a little bit confusing.
s.version = "0.1.0-beta"
Change the version and push again!!!
Hi, I have the same problem too. Since my user case is that I want to make sure the version shown on Cocoapods is the same as the project version I have published on website. If I do find some serious bugs or License problem in the current version, is it possible for me to update it with the same version? Or can I just delete the current version and update it again? I cannot find an option to delete the published Cocoapods pod spec in the command lists. Thanks!
The commands are in the 1.0 betas
Thanks orta! I do find the delete command.
Hi @orta, the delete command in pod trunk says:
Once deleted, this version can never be pushed again.
Does that mean it is not a way to fix a broken podspec without changing the version?
@oliverou , did you end up trying it?
@jcanizales Yes, you cannot update the same version once you push to cocoapods trunk, you can only update your pods in next version. So be careful to update your pods.
I encountered this issue when I pod trunk push at the second time as the first run failed when running pod repo update, it just pushes the podspec to cocoapods remote server successfully at the first time. Confirmed it just now. FYI.
@xingheng, I tried twice. it did not work and why it should in second time. I guess there should have been a way to update existing podspec file (scope for improvement).
If not then, I guess, we have to
Not happy though :-(