Hello i am facing this issue related to Cinterop w...
# multiplatform
a
Hello i am facing this issue related to Cinterop while syncing gradle in my KMP/CMP project do anyone have any solution ? here are some details -
Copy code
Macos - 26.1 Beta (Tahoe)
Xcode - 26.0.1
kotlin - "2.2.20-RC2"
Jvm - 17
ComposeMultiplatform - "1.10.0-alpha01"
org.gradle.caching=false
org.gradle.configureondemand=true
kotlin.mpp.enableCInteropCommonization=true
i am using spmforkmp plugin for native swift implementations
f
Hi, try the stable version of Kotlin 2.2.20. Also, look above this error if you have another compilation error.
Usually the error you put in your file is useless
a
I changed the kotlin version to 2.2.20 but it does not makes any difference , i am getting same error project was working when i am using macos 26.0 ( after updating to Macos 26.1 beta ) , it is getting failed
f
oh, I don’t test on beta version of iOS/macOS...
a
Any idea of this below error , or how can i solve this , i am working on production app at my company , and now i am blocked from last 2 days due to this
Copy code
> Task :composeApp:commonizeCInterop FAILED
Exception in thread "main" java.lang.IllegalStateException: Unresolved classifier: platform/Metal/MTLLogicalToPhysicalColorAttachmentMap
	at org.jetbrains.kotlin.commonizer.metadata.CirDeserializers.type(CirDeserializers.kt:655)
	at org.jetbrains.kotlin.commonizer.metadata.CirDeserializers.valueParameter(CirDeserializers.kt:180)
	at org.jetbrains.kotlin.commonizer.metadata.CirDeserializers.function(CirDeserializers.kt:161)
	at org.jetbrains.kotlin.commonizer.tree.deserializer.CirTreeFunctionDeserializer.invoke(CirTreeFunctionDeserializer.kt:29)
	at org.jetbrains.kotlin.commonizer.tree.deserializer.CirTreeClassDeserializer.invoke(CirTreeClassDeserializer.kt:55)
	at org.jetbrains.kotlin.commonizer.tree.deserializer.CirTreePackageDeserializer.invoke(CirTreePackageDeserializer.kt:41)
f
Oh, I have already seen this one, try to build for only one apple target, comment the others
If I’m right, That’s something I can’t fix, it seems to be a Kotlin compiler issue not a plugin one.
The workaround is to go back to xcode 16.4
a
yepp doesn't seems to be plugin issue issue is with kotlin compiler itself
f
I guess, you can create a new issue on the JB tracker
👍 1
a
ok i will try to downgrade Xcode Thanks for the reply btw Spm4Kmp plugin is really awesome , using it from last 8 months in my company project . thanks for this superb plugin @François
❤️ 1
f
that’s the second time I see this compiler issue with xcode 26
a
yepp i saw one message from official JB team member , they are working on it to support Xcode 26
f
I don’t know if there are aware about this issue with cinterop and xocde 26. I don’t have a reproducer for the issue
a
i will try sharing the reproducable app repo tomorrow
f
you’re trying beta version, not a good idea with kotlin 😄
a
yepp , my mistake auto updates and install was enabled , and mac got updates by itself i had disabled it now ,and will be careful in future
@François if possible can you please share the versions of plugins and tools which is working on Macos 26 ! spm , xcode , kotlin , swift and cmp ! thanks
f
it’s the latest version 1.0.0-Beta05 and Kotlin 2.2.20, I don’t see what else needed
a
Thanks 🙏