v

    vmichalak

    3 years ago
    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:
    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

    svyatoslav.scherbina

    3 years ago
    Do you use
    UIDevice
    class in your test sources? Do you use it in main sources?
    h

    Hauke Radtki

    3 years ago
    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

    vmichalak

    3 years ago
    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
    s

    svyatoslav.scherbina

    3 years ago
    @Hauke Radtki thanks, confirmed.
    g

    gonzooin

    3 years ago
    @vmichalak What did you mean by recreate the project ? I tried to delete/reclone my project but it didn't FIX anything.
    v

    vmichalak

    3 years ago
    I just destroy et recreate from scratch ^^"