I have a published Cocoapod, say it's named abc-sdk
, I wish to fix its name (capitalization) to Abc-SDK
. Is it possible?
I tried changing the s.name
in the podspec (and the podspec file name capitalization as well) but when I run pod trunk push
I get:
[!] The following validation failed:
- Name is already taken.
What's the right way to do it?
< Switching from submodules to CocoaPods 1 Install CocoaPods, if you have not done so already 2 Create your Podfile 3 Remove the submodule reference 4 Add a reference to the removed library in your Podfile 5 Run pod install More ...
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.
After cloning the repo, the project can immediately build and run, even without having CocoaPods installed on the machine. There is no need to run pod install, and no Internet connection is necessary. The Pod artifacts (code/libraries) are always available, even if the source of a Pod (e.g. GitHub) were to go down.
Add a CocoaPod by specifying pod '$PODNAME' on a single line inside your target block. Save your Podfile. Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app. Integrating CocoaPods with an existing workspace requires one extra line in your Podfile.
Hrm, so yes this can be changed (via a PR to the Specs repo), but it is not encouraged as it will break everyone's Podfile.
One other way to deal with this is to create a new Podspec outright and to use deprecated_in_favor_of
on the older one to point to the new one. E.g. AbcSDK
instead of Abc-SDK
.
Create and push a new spec first, then deprecate the old spec in its entirety. CocoaPods now supports the following command (as of at least 1.0.0.beta.8):
pod trunk deprecate OLD_SPEC --in-favor-of=NEW_SPEC
https://github.com/CocoaPods/cocoapods-trunk/issues/31
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With