https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
p

Pete Hellyer

03/06/2024, 3:37 PM
getting an unusual not seen before error when compiling my KMP project in Xcode:
Copy code
> Task :composeApp:cinteropInteropIosArm64 FAILED
Exception in thread "main" java.lang.Error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:615:74: error: unknown type name 'NSUInteger'
	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:275)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1246)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1229)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1225)
	at org.jetbrains.kotlin.native.interop.gen.jvm.DefaultPlugin.buildNativeIndex(Plugins.kt:33)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:311)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLibSafe(main.kt:243)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.access$processCLibSafe(main.kt:1)
	at org.jetbrains.kotlin.native.interop.gen.jvm.Interop.interop(main.kt:101)
	at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:47)
	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:23)
	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:45)
Any pointers?
it appears to be something very specific about compiling against the 17.4SDK…
b

brandonmcansh

03/06/2024, 5:59 PM
hitting it too
fun
time to download 15.2 and switch
ok if anyone hits this to unblock yourself download Xcode 15.2 and `
Copy code
sudo xcode-select -s
to it
🙌 1
👍 3
👀 1
gratitude thank you 2
p

Pete Hellyer

03/06/2024, 8:10 PM
my days.. I try and avoid updating Xcode to stop this kind of thing. OSX thrust it on me quietly last night and I didn’t even notice. Many thanks.
b

brandonmcansh

03/06/2024, 8:28 PM
same here lol
of course
s

Suresh Maidaragi

03/11/2024, 2:18 PM
Similar issue I have faced, then I resolved it by removing below block of code from
r

rocketraman

04/20/2024, 2:39 AM
For anyone coming upon this now, note that 1.9.23 fixes this. https://youtrack.jetbrains.com/issue/KT-65542/Cinterop-tasks-fails-if-Xcode-15.3-is-used
193 Views