icerockdev / moko-mvvm

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

Can't build iOS sample-declarative-ui #182

Closed aleksey-ho closed 2 years ago

aleksey-ho commented 2 years ago

I downloaded master source code, opened "sample-declarative-ui" project in Android Studio, I was able to run the android app without any changes, but iosApp failured with:

error: There is no XCFramework found at '/Users/../../moko-mvvm-master/mvvm-flow/apple/xcode/xcframework/mokoMvvmFlowSwiftUI.xcframework'. (in target 'iosApp' from project 'iosApp')
error: There is no XCFramework found at '/Users/../../moko-mvvm-master/sample-declarative-ui/shared/build/xcode/MultiPlatformLibrary.xcframework'. (in target 'iosApp' from project 'iosApp')
error: There is no XCFramework found at '/Users/../../moko-mvvm-master/sample-declarative-ui/shared/build/xcode/MultiPlatformLibrary.xcframework'. (in target 'iosApp' from project 'iosApp')

Got same error when tryin to open iosApp.xcworkspace in Xcode.

Alex009 commented 2 years ago

@aleksey-ho hi! at first, you should build common code. run ./gradlew compileMokoFlowSwiftUIXCFramework in repo root, and ./gradlew syncMultiPlatformLibraryDebugXCFramework in sample-declarative-ui. after it all will be good.