CocoaPods/Core

Multiple Podspecs in single Private repository

djbrooks111 opened this issue · 1 comments

Hey CocoaPods,

I am trying to implement a solution to managing 3rd party .frameworks that are not already available via CocoaPods. I had an idea of having a single private repository, that will store each .framework and will have one podspec per .framework. I decided against using subspaces so I could version each .framework separately via tags.

I currently have two .frameworks in a folder in my repo called libs. I then, in the root, have two separate podspecs that have all the required parameters and the bellow snippets.

The folder structure is:

.
+-- .gitignore
+-- README.md
+-- Framework1.podspec
+-- Framework2.podspec
+-- libs
|   +-- Framework1.framework
|   +-- Framework2.framework

Framework1.podspec with tag framework1-1.0

spec.source    = { :git => 'https://github.com/xxx/ios-frameworks.git', :tag => "framework1-#{spec.version}" }
spec.platform     = :ios
spec.vendored_frameworks     = 'libs/Framework1.framework'

Framework2.podspec with tag framework2-1.0

spec.source     = { :git => 'https://github.com/xxx/ios-frameworks.git', :tag => "framework2-#{spec.version}" }
spec.platform     = :ios
spec.vendored_frameworks     = 'libs/Framework2.framework'

My Podfile then has:

pod 'Framework1',   :git => 'git@github.com:xxx/ios-frameworks.git', :tag => 'framework1-1.0'
pod 'Framework2',  :git => 'git@github.com:xxx/ios-frameworks.git', :tag => 'framework2-1.0'

So the problem that I am encountering is that Framework1 downloads correctly when I run pod install and I see the correct .framework in a libs folder and the README.md in the root of the /Pods/Framework1/ folder. However, Framework2 only downloads the README.md

Other information, Framework1 was commit and tagged to the ios-frameworks repo first. Framework2 came second.

Thanks so much! If you need more information, glad to provide

Hello there, thanks for the report!

Seems like framework2...

spec.vendored_frameworks     = 'libs/Framework2.framework'

...is not pointing to the right path.

So far I really don't think is a CocoaPods issue which is what we use this repo for. My recommendation is asking StackOverflow under cocoapods tag.

We can easily re-open this issue if we find out this is truly a library issue.