icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
351 stars 21 forks source link

How to integrate with other Moko libraries #45

Closed Narek1994 closed 2 years ago

Narek1994 commented 2 years ago

Hi, can someone help me to understand how this type of intergration should look alike, I have done everything written in Setup part, but checking with Sample app there is a completely different structure compared with mine.

Here is my plugins and dependencies list

Screen Shot 2022-05-20 at 17 27 07

And here is Kswift configuration part.

Screen Shot 2022-05-20 at 17 25 21

After that it generates shared.podspec, file

Screen Shot 2022-05-20 at 17 28 32

and pod successfully installs, but I dont get any generated file in my source code. Not for sealed classes and not for any binding extensions. Can someone help me to understand what I am doing wrong.

Alex009 commented 2 years ago

hi. generated swift code not included into Kotlin framework. generated code can be added to Xcode directly via "Add files..." (location of files described here) or by adding second cocoapod - sharedSwift. podspec of sharedSwift generates by gradle task of kswift - kSwiftSharedPodspec.

here sample with direct files - https://github.com/Alex009/moko-kswift-usage-sample/tree/regular-framework another sample with direct files - https://github.com/Alex009/moko-paging-sample sample with cocoapods - https://github.com/icerockdev/moko-kswift/tree/master/sample/mpp-library-pods

Narek1994 commented 2 years ago

Thanks, figured it out with cocoapods!