Search code examples
ioscocoapods

CocoaPods: Creating Public Pod depending on Private Pod trunk push not working


I am creating a public pod that depends on a private pod (can be installed from external Spec in public GitHub).

When I am linting my .podspec file, it works fine without any issue.

pod lib lint --sources='https://github.com/PRIVATE_REPO_GIT/Specs.git,https://github.com/CocoaPods/Specs.git' --verbose --no-clean

But when I try to pod trunk push my pod, it show the below error.

-> MY_POD_NAME (1.0.0) - ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for PRIVATE_REPO_POD depended upon by MY_POD_NAME

Is it possible to create a pod with a depending pod that is private? Since we need our users to get our repo and the dependent repo with adding one line in .podfile and we done this before but the libraries were not private.


Solution

  • No.

    pod trunk push is intended to make pods available for public usage. The command fails since that won't be the case if there is a private dependency.

    Any pod with private dependencies should also be private only.