touchlab / KaMPKit

KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
https://touchlab.co/
Apache License 2.0
2.2k stars 199 forks source link

Create CocoaPod plugin documentation #59

Closed samhill303 closed 4 years ago

samhill303 commented 4 years ago

How CocoaPods is used for importing the shared framework could be better documented. How you make a podspec. How to add the pod to podfile. Where the script in the podspec ends up. What that script does. Why this is much nicer than manually importing the frameworks and writing your own build phases and gradle tasks

AlexTrotsenko commented 6 months ago

@samhill303 we are considering to start new KMM project and I am wondered about cocoapods vs regular framework vs SPM integration.

I see in the added documentation "Cocoapods is the much simpler method of adding your library." https://github.com/touchlab/KaMPKit/pull/80/commits/f5c0ae4ffb8d5515e81add5d0ed119dc5947cd75#diff-4d44b80f5a22c80de2f3737e2661b292265cc68c9e6d0235e0ed586c4fd9fb88R3

I am wondered why then in the official documentation I see that regular framework is used by default? "The shared module can be used as a regular framework or as a CocoaPods dependency. By default, the Kotlin Multiplatform wizard creates projects that use the regular framework dependency." https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-create-first-app.html#examine-the-project-structure

What are the advantages and disadvantages of using regular framework?

Also I have seen, that now https://github.com/touchlab/KMMBridge is available to provide SPM integration. Is there any reason why it's not used in the KaMPKit ? Is there cases where cocoapods are still better then SPM for KMM use case ?