I'm trying to compile my KMP project for watchOS b...
# multiplatform
c
I'm trying to compile my KMP project for watchOS but get a weird error. The compilation goes well, but Xcode ignores the framework with the following warning and then fails linking the app:
Copy code
Ignoring file '~/Projects/someapp/app-ios-base/build/xcode-frameworks/Debug/watchos11.0/SomeAppBase.framework/SomeAppBase': fat file missing arch 'arm64', file has 'arm64_32'
I assume this is some config issue in gradle to force both archs, but not sure how to do this. In gradle I have:
Copy code
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64(),
        watchosX64(),
        watchosArm32(),
        watchosArm64(),
        watchosSimulatorArm64(),
    ).forEach {
        it.binaries.framework {
            baseName = "SomeAppBase"
            isStatic = true
            wrappedProjects.forEach { p ->
                export(p)
            }
            target
        }
    }
r
Try adding
watchosDeviceArm64()
c
I did that but then KTOR can’t be resolved….
Copy code
No matching variant of io.ktor:ktor-client-darwin:2.3.11 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'watchos_device_arm64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:
Ohhh, I see KTOR 3.0.0 should fix this. I then also found this: https://youtrack.jetbrains.com/issue/KT-53107/Add-arm64-support-for-watchOS-targets-Xcode-14
r
Oh huh, I never realized ktor didn't add that target until 3.0
c
This is the only project I didn't update to 3.0 yet 😄 Seemingly comes back to bite me know...
a
well you're lucky anyway, because 3.0 was released very recently
c
🫠
Guess that's the end of my watchOS experiment
a
Looks like it... kotlin 2.0.20 has native UUID support fyi (experimental)
r
You might just need some more version bumps. eg Multiplatform Settings added support in 1.0 0 but it wasn't there in 1.0.0-RC
a
Napier doesn't have it but other logging tools might e.g. Kermit
c
I'm just updating everything 😄 But the likelihood of all of them having it....quite low
Yeah, comes down to
colormath
and
napier
, the latter being a real issue 😄 Thanks guys!
Opened PRs in both missing libs, let's see if the maintainers are as awesome as @russhwolf! 😄
👍 1
🙂 1