https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
m

Marko Novakovic

02/06/2023, 7:08 PM
Copy code
The list of "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitsimarm64): 1.3.0" dependencies that may lead to conflicts:
1. "stdlib: 1.8.0" (was initially compiled with "stdlib: 1.6.20")
2. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21")
3. "org.jetbrains.kotlin.native.platform.darwin: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.darwin: 1.6.21")
4. "org.jetbrains.kotlin.native.platform.posix: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.20")
5. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.2")
6. "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4" (was initially compiled with "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64)")
any help with resolving this?
l

Landry Norris

02/06/2023, 7:18 PM
You have to disable caching
kotlin.native.cacheKind=none
in your gradle.properties
m

Marko Novakovic

02/06/2023, 7:33 PM
@Landry Norris that worked but now am getting:
Undefined symbols for architecture arm64
l

Landry Norris

02/06/2023, 7:34 PM
As of right now, Compose methods cannot be public when building a dynamic framework. This can be solved in one of two ways: make the composable methods internal, or set the framework to build statically.
m

Marko Novakovic

02/06/2023, 7:35 PM
or set the framework to build statically
how to do that?
but I don’t have any compose method yet
l

Landry Norris

02/06/2023, 7:36 PM
Are you using cocoapods, or do you declare frameworks when setting up iOS targets?
Can you give an example of an undefined symbol?
m

Marko Novakovic

02/06/2023, 7:36 PM
tried both, cocoapods and other one
l

Landry Norris

02/06/2023, 7:38 PM
If any undefined symbols have MTL at the start, you’re probably not linking against Metal. Have you looked at the samples in the compose-jb repo?
m

Marko Novakovic

02/06/2023, 7:49 PM
I just copy pasted existing project, which works
am really clueless here. how to link against Metal?
I didn’t add
internal
to
@Composable
fun….. omg
46 Views