icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
997 stars 95 forks source link

Can I have a custom name for library? #66

Closed AlexeySobolevskiy closed 3 years ago

AlexeySobolevskiy commented 3 years ago

Hi!

I'm trying to integrate moko-mvvm for iOS. Unfortunately, integration instructions are not clear for me. In commercial project we have Kotlin Native Multiplatform engine for several years. On Kotlin side everything is fine, but in iOS I'm unsuccessfully trying to just install moko and have its classes in Xcode. Is it strictly required to have a name "MultiPlatformLibrary" and "mpp-library" for builded framework? This how it is in example iOS project: https://github.com/icerockdev/moko-mvvm/blob/master/sample/ios-app/Podfile

Alex009 commented 3 years ago

hi! iOS additions cocapod MultiPlatformLibraryMvvm require that kotlin framework should be named MultiPlatformLibrary. It's required to import kotlin classes in cocoapod - https://github.com/icerockdev/moko-mvvm/blob/master/mvvm/src/iosMain/swift/Core/UILabel%2BLiveData.swift#L6

if you not use MultiPlatformLibraryMvvm cocoapod in iOS - you can set any name for kotlin framework. Or you can copy-paste all code from https://github.com/icerockdev/moko-mvvm/tree/master/mvvm/src/iosMain/swift directly to your project and replace import MultiPlatformLibrary to import YourKotlinFrameworkName

AlexeySobolevskiy commented 3 years ago

@Alex009

Thank you very much! Unfortunately, I need exactly MultiPlatformLibraryMvvm :) I will try with requested solutions