Home > Back-end >  Is it possible to push public CocoaPod that has private CocoaPod dependency?
Is it possible to push public CocoaPod that has private CocoaPod dependency?

Time:10-14

I'm trying to

"pod trunk push MyPublicCocoaPod.podspec" to https://github.com/CocoaPods/Specs.git

which has dependency of "s.dependency 'MyPrivateCocoaPod'" (requires below url to install, my-private-specs.git)

source 'https://github.com/CocoaPods/Specs.git'

source 'https://github.com/my-private-specs.git'

Is there a way to release MyPublicCocoaPod in this kind of dependency structure?

I am getting below error:

  • ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for MyPrivateCocoaPod depended upon by MyPublicCocoaPod

Does public CocoaPod need to be dependent of other public CocoaPods only in order to release? Thanks in advance.

CodePudding user response:

Public pods must be buildable publicly, so pods with private dependencies cannot be published to trunk.

You can publish to a private Specs repo. Details here.

  • Related