moko-mvvm icon indicating copy to clipboard operation
moko-mvvm copied to clipboard

Use mokoMvvmFlowSwiftUI with framework

Open kostapostolakis opened this issue 1 year ago • 6 comments

I have started a KMM project using "Regular Framework" as "iOS framework distribution". Can I use the mokoMvvmFlowSwiftUI library in this project or I should change to "Cocoapods"? Is it an easy way to implement it?

kostapostolakis avatar Dec 03 '23 20:12 kostapostolakis

hi. you can have regular framework integration of KMM module and add cocoapod

pod 'mokoMvvmFlowSwiftUI', :podspec => 'https://raw.githubusercontent.com/icerockdev/moko-mvvm/release/0.16.1/mokoMvvmFlowSwiftUI.podspec'

or you can just download https://repo1.maven.org/maven2/dev/icerock/moko/mvvm-flow-swiftui/0.16.1/mvvm-flow-swiftui-0.16.1.zip and use mokoMvvmFlowSwiftUI.framework from this archive

Alex009 avatar Dec 04 '23 03:12 Alex009

When I import the framework, I get the following error: Screenshot 2023-12-09 at 2 38 00 PM

kostapostolakis avatar Dec 09 '23 12:12 kostapostolakis

Based on this issue I copy-pasted these files in my project and everything worked now. I also changed "import MultiPlatformLibrary" to "import Shared" in every file, which was the import of my shared kmm project.

kostapostolakis avatar Dec 10 '23 13:12 kostapostolakis

Based on this issue I copy-pasted these files in my project and everything worked now. I also changed "import MultiPlatformLibrary" to "import Shared" in every file, which was the import of my shared kmm project.

Hello, can you tell me where you pasted them? I tried copying them to the root of the iOS project, but it still doesn't let me import mokoMvvmFlowSwiftUI. It says 'No such module 'mokoMvvmFlowSwiftUI''

image

joeyoggie avatar Jan 07 '24 19:01 joeyoggie

Based on this issue I copy-pasted these files in my project and everything worked now. I also changed "import MultiPlatformLibrary" to "import Shared" in every file, which was the import of my shared kmm project.

Hello, can you tell me where you pasted them? I tried copying them to the root of the iOS project, but it still doesn't let me import mokoMvvmFlowSwiftUI. It says 'No such module 'mokoMvvmFlowSwiftUI''

image

Try to copy paste them inside PikApp folder.

Based on this issue I copy-pasted these files in my project and everything worked now. I also changed "import MultiPlatformLibrary" to "import Shared" in every file, which was the import of my shared kmm project.

Hello, can you tell me where you pasted them? I tried copying them to the root of the iOS project, but it still doesn't let me import mokoMvvmFlowSwiftUI. It says 'No such module 'mokoMvvmFlowSwiftUI'' image

Try to copy paste them inside PikApp folder.

It worked! Thank you! I copied them into Sources folder (under PikApp folder) and added them as a target in the Package.swift file.

I'm new to iOS side of things, so there may probably a more correct apprach; but hey, it works! :)

joeyoggie avatar Jan 07 '24 20:01 joeyoggie