Hi guys, how can we package the shared module into...
# multiplatform
b
Hi guys, how can we package the shared module into an ios library that can be consumed as cocoapod
l
Apply the cocoapods plugin, and it will create a podspec and a framework output. You can set a publishDir in the cocoapods configuration to create a publish task (writes the podspec and framework to publishDir). My team has a script that runs the publish task, then copies the contents of publishDir to another git repo and pushes it.
b
Thanks, that would be great it you could share samples on how to do it
l
I can’t find any tutorials on this, but the config for publishing is
Copy code
//Publish locally by calling ./gradlew podPublishXCFramework
publishDir = File(rootDir, "pod")
in the cocoapods block. This will produce a podspec and xcframework for you (release and debug). Just copy the files wherever they’re needed depending on how you set up cocoapods.
I believe this is roughly how KMMBridge works if you want to set that up, but I haven’t used it yet.
b
thanks, will check it