Hello, Call for feedback on my <experimental featu...
# feed
f
Hello, Call for feedback on my experimental feature of the spmForKmp plugin. It solves a big issue about iOS external dependency: On the CocoaPods plugin, you need to build two times the dependency, one for the Kotlin/cinterop side and one for the Xcode (linking&resources) side. This new feature made the build on the Xcode side totally useless as the generated content is automatically copied to the iOS application, like compose resources or Moko resources, you can say goodbye on the duplicated symbol you have when you start your app. it has some limitations but generally makes the integration simpler. If this feature is stable enough by your feedback, I plan to enable it by default and do a total rework of the plugin configuration (road to 1.0.0 😄).
🔥 2
s
I applied this setting in my project when migrating from cocoapods to SPM yesterday: https://github.com/maplibre/maplibre-compose/blob/main/buildSrc%2Fsrc%2Fmain%2Fkotlin%2Fspm-maplibre.gradle.kts It looks like it's working well! But I'm not sure how it actually works. Here I have a demo-app Kotlin module depending on a maplibre-compose Kotlin library wrapping the Maplibre framework for iOS. How does the Maplibre framework ultimately end up in the iOS app? Is it included inside my DemoApp framework somehow, like my Kotlin Native binary and resources are? Or is it linked directly to my Kotlin library's binary somehow?
Oh and if you're curious, here's my code diff to migrate to your plugin from the cocoapods plugin: https://github.com/maplibre/maplibre-compose/pull/425/files
❤️ 1
f
Thanks! Well, like Moko resource or CMP resource, during the build of the framework from Xcode, it looks at the build Envs and copies to the correct location. For example: https://github.com/icerockdev/moko-resources#without-orgjetbrainskotlinnativecocoapods Or my unit test. So, you can find the copied files at the location of Xcode’s env CONTENTS_FOLDER_PATH
And of course, only compatible resources 🙂 .