Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mokoMvvmFlowSwiftUI with framework #260

Open
kostapostolakis opened this issue Dec 3, 2023 · 6 comments
Open

Use mokoMvvmFlowSwiftUI with framework #260

kostapostolakis opened this issue Dec 3, 2023 · 6 comments

Comments

@kostapostolakis
Copy link

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?

@Alex009
Copy link
Member

Alex009 commented Dec 4, 2023

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

@kostapostolakis
Copy link
Author

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

@kostapostolakis
Copy link
Author

kostapostolakis commented Dec 10, 2023

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.

@joeyoggie
Copy link

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

@konstantinos-apostolakis

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.

@joeyoggie
Copy link

joeyoggie commented Jan 7, 2024

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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants