During my Kotlin MPP (Android / iOS) build i have ...
# multiplatform
v
During my Kotlin MPP (Android / iOS) build i have a strange issue during the 'linkTestDebugExecutableIos' task. (more info in reply to this post) Do you have an idea to correct this?
Gradle issue:
Copy code
Undefined symbols for architecture x86_64:
    "_OBJC_CLASS_$_UIDevice", referenced from:
        objc-class-ref in combined.o
    ld: symbol(s) not found for architecture x86_64
    e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Gradle version: 5.1.1 Kotlin version : 1.3.31 Coroutines version : 1.2.1 Ktor version: 1.1.5 Kotlinx.Serialization version: 0.11.0
s
Do you use
UIDevice
class in your test sources? Do you use it in main sources?
h
Suffering the same issue after upgrading from Kotlin 1.3.20 to 1.3.31. For me its happening for the arm64 target. I'm not using UIDevice anywhere in my codebase.
Okay, for me it was just a rogue unused import of Framework.UIKit.* that caused this. As I'm not using UIKit its not an issue for me, but shouldn't this work in general?
v
I don't use UIDevice in my tests :(
I finally recreate the project from scratch and it works ... I don't understand why but ... It's ok :3
👍 1
s
@Hauke Radtki thanks, confirmed.
g
@vmichalak What did you mean by recreate the project ? I tried to delete/reclone my project but it didn't FIX anything.
v
I just destroy et recreate from scratch ^^"