I'm using a fork of a repo that contains a larger project and an SDK in a subfolder. The podspec has a source_files
property that configures the subfolder, but the top-level repo has no knowledge of the podspec, and so pointing to:
pod 'PodName', :git => 'https://github.com/owner/project.git'
... fails because there's no podspec in the root. Is there a way to specify using a subfolder when pointing Cocoapods to a git repo?
Something like:
pod 'PodName', :git => 'https://github.com/owner/project.git', :subfolder => '/subfolder/path/to/podspec'
I was able to do this by pointing to the raw file on github and using the podspec option. Cocoapods is expecting the pod spec to be in the root directory with all of the :git =>
options but you can point directly to a file using the :podspec =>
option.
pod 'PodName', :podspec => 'https://raw.githubusercontent.com/owner/project/branch/subfolder/project.podspec'
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