Hi there, Is it possible to use “native.cocoapods”...
# multiplatform
p
Hi there, Is it possible to use “native.cocoapods” library in order to automatically publish the common code in github as a cocoa pod library? The auto generated podspec sets the source as:
Copy code
spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" }
This works fine locally but I want to change it to something like:
Copy code
spec.source = { :git => 'git@my_path.git', :tag => s.version.to_s}
P.S Ideally I would like to use 2 repositories (Android + KMM, iOS) and feed the iOS app with a KMM cocoa pod.
@Kris Wong you are my last hope :)
k
the cocoapods plugin does not provide this functionality. typically your build server or another plugin might provide this.
this is technically not specific to KMM. any strategy for publishing a cocoapod would apply.
however, keep in mind that the cocoapods plugin uses a vendored framework, which means your framework would need to be hosted somewhere (like Artifactory).
p
But this procedure is quite standard in iOS native code and you can share your private pods though github. So this seems like a native.cocoapods specific issue to me.
k
and what technique do you use to share your other podspec files with git?
p
We set the source in podspec like this:
Copy code
spec.source = { :git => 'git@my_path.git', :tag => s.version.to_s}
In native.cocoapods the podspec is autogenerated, so we cannot change it manually, at least that’s my understanding, correct me if I am wrong.
k
it is autogenerated, but that doesn't mean it can't be changed before it's pushed to a git repo
p
Do you have in mind any working example, I would really appreciate it.
k
I do not
👍 1