```Hey guys! I'm trying to put the skie package in...
# touchlab-tools
d
Copy code
Hey guys! I'm trying to put the skie package in and build the iOS app, but I get this error. Can someone help me?
`- Task
:shared:skieConfigureMinOsVersionDebugFrameworkIosSimulatorArm64
of type `co.touchlab.skie.plugin.coroutines.ConfigureMinOsVersionTask`: cannot serialize object of type 'com.android.build.gradle.internal.tasks.DexMergingTask', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.`
f
Hi! Which version of SKIE do you use?
d
Copy code
skie = "0.6.2"
f
This version doesn’t support configuration cache. Updating to 0.6.4 should solve the issue.
d
thanks, build goes done
Sorry for that questions, i am a beginner. When i try to listen flow state change in swiftUi i get this error flow:
private var _state = MutableStateFlow(ViewState(true)) var state:StateFlow<ViewState> = _state.asStateFlow()
code ios:
for
*await* value *in* viewModel.state{
stateUi = value
}
error:
For-in loop requires 'any Kotlinx_coroutines_coreStateFlow' to conform to 'AsyncSequence'
f
The error says that the Flow type wasn’t converted by SKIE. Do other SKIE features work as expected?
d
can you help me to convert this code to the right way? to works with SKIE
t
@Derek Alves Could you show your
skie
configuration in Gradle?
And can you make sure you're applying SKIE Gradle plugin in the correct module?
d
i put in
build.gradle.tks
inside plugin {
Copy code
alias(libs.plugins.skie) apply false
} in shared
build.gradle.tks
inside plugin {
Copy code
id("co.touchlab.skie")
}
t
Please use triple ` code blocks for code to make it more readable. Do you have any
skie
configuration block in the
shared
module's buildscript?
Also, how do you integrate the KMP framework into your Xcode project?
d
dont have any configuration block in buildscript
i create the project and make basic config, works normal but when i try to use viewmodel in ios i get this error
t
Can you elaborate on how your project is setup?
Or if possible share the project?
d
https://github.com/derek-alves/kmp-study this is the project, i try to use new viewmodel version to test reactivity with flow in ios
t
Your Kotlin code doesn't compile
image.png
d
sorry, i push wrong code i will remove this code
done
t
That builds in Xcode too though
Are you sure your Kotlin code was compilable before you went to write the
for await ...
in Xcode?
image.png
d
can you run with
for await
? reactivity works?
t
I just tried if the code compiled and it did
But since it's showing "Loading ...", looking at your code I'd say the
for await
works
d
alright, works here to. Thanks very mutch. how i can listen viewModel state to when to value changes in ios??
t
I'm not sure what you mean