Samples instruction
Please provide a description how to build and test the samples.
hi!
use:
git clone https://github.com/icerockdev/moko-widgets.git- open repo in Android Studio and after sync run
sampleapp (on android).
run on iOS:
cd ios-app && pod installto install all pods dependencies./gradlew :sample:mpp-library:syncMultiPlatformLibraryDebugFrameworkIosX64to compileMultiPlatformLibrary.frameworkcd ios-app && pod installagain to correctly integrateMultiPlatformLibrary.frameworkin project
is such a description sufficient?
Thanks, such a short description would be enough. In Adnroid Studio after the sync I get an error form Java Compiler "WARNING: Unsupported Kotlin plugin version.", but the app seems to build and run.
The info about iOS steps is very helpful, because when I tried it on my own I always got an import error for "MultiPlatformLibrary". Now it's clear why. However I still have issues with the ios build.
- After running pod install in ios-app folder CocoaPods complains about "InputMask"
Analyzing dependencies
Pre-downloading: `MultiPlatformLibraryMvvm` from `https://github.com/icerockdev/moko-mvvm.git`, tag `release/0.4.0-dev-2`
[!] CocoaPods could not find compatible versions for pod "InputMask":
In snapshot (Podfile.lock):
InputMask (= 5.0.0, ~> 5.0.0)
In Podfile:
moko-widgets-flat (from `../../`) was resolved to 0.1.0, which depends on
InputMask (~> 5.0.0)
None of your spec sources contain a spec satisfying the dependencies: `InputMask (= 5.0.0, ~> 5.0.0), InputMask (~> 5.0.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
pod update before pod install solves this problem.
./gradlew :mpp-library: syncMultiPlatformLibraryDebugFrameworkIosX64generates following output. The build fails.
> Configure project :gradle-plugin
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.3.31` that might work differently than in the requested version `1.3.61`.
> Configure project :widgets
Kotlin Multiplatform Projects are an experimental feature.
> Configure project :sample:mpp-library
CocoaPod mokoWidgetsFlat integrated only in link target iosArm64 (native) stage
CocoaPod mokoWidgetsFlat integrated only in link target iosX64 (native) stage
FAILURE: Build failed with an exception.
* What went wrong:
Project 'mpp-library' not found in root project 'moko-widgets'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
sorry, invalid command. should be: ./gradlew :sample:mpp-library:syncMultiPlatformLibraryDebugFrameworkIosX64 when you run from root repository dir
That looks better. I can build and run it on iOS, too.