Thread
#multiplatform
    Arkadii Ivanov

    Arkadii Ivanov

    7 months ago
    I'm unable to build an Xcode project on macOS M1. The error is:
    Task 'embedAndSignAppleFrameworkForXcode' not found in project '😒ample:todo-darwin-umbrella'.
    I already checked KT-49637 and KT-47077 which look similar to my problem, but nothing was helpful. I'm using Kotlin 1.6.10 and I have
    iosSimulatorArm64
    target configured. I have the following Java version installed locally:
    15.0.6 (arm64) "Azul Systems, Inc." - "Zulu 15.38.17"
    Also I noticed that there are Gradle tasks
    linkDebugFrameworkIosArm64
    and
    linkDebugFrameworkIosX64
    , but there is no Gradle task like
    linkDebugFrameworkIosSimulatorArm64
    , only
    linkDebugTestIosSimulatorArm64
    which seems irrelevant. Running the Xcode in Rosetta mode fixes the build, but I would like avoid Rosetta if possible. Are there any ideas of how I could fix the issue?
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    7 months ago
    Hello! The fact that
    linkDebugFrameworkIosSimulatorArm64
    is missing might mean that, while having this target declared, your project is still missing the framework declaration. Could you please check if its present there too?
    Arkadii Ivanov

    Arkadii Ivanov

    7 months ago
    Thanks for pointing that out! I have the framework declared under
    ios {}
    , perhaps that is the issue and I should also explicitly declare it for
    iosSimulatorArm64
    . I will try and post updates here soon.
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    7 months ago
    Yes, that should be it. Target shortcuts do not include Apple Silicon simulators(link).
    Arkadii Ivanov

    Arkadii Ivanov

    7 months ago
    Thanks again, that fixed the issue.
    John O'Reilly

    John O'Reilly

    7 months ago
    the "Task 'embedAndSignAppleFrameworkForXcode' not found" issue seems to come up quite frequently....would it make sense to have something on say one of the official Kotlin/JetBrains pages with some info on possible causes etc?
    I could be wrong but I think there's been occurrences caused by different issues to the one in this thread.
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    7 months ago
    From what I can see, the amount of feedback mentioning this output is quite small. However, maybe it really worth something like a FAQ post. cc @akapanina
    John O'Reilly

    John O'Reilly

    7 months ago
    if you search for example for "'embedAndSignAppleFrameworkForXcode' not found" in kotlinlang there's quite a few results
    @Rick Clephas I think you had come across issue as well with this related to something like framework name setting I think?
    r

    Rick Clephas

    7 months ago
    Yeah correct so far I known of 3 possible causes:1. a missing target (e.g.
    iosSimulatorArm64
    ) 2. not configuring the framework (which was the case for @Arkadii Ivanov). I was faced with that after trying to migrate from CocoaPods to the embedAndSign task 3. trying to run the embedAndSign task outside the Xcode environment (which isn’t supported) A lot of the confusion seems to be around the
    ios
    shortcut and the “missing”
    iosSimulatorArm64
    target. But there should be a solution “in the works” 🙂: https://kotlinlang.slack.com/archives/C3PQML5NU/p1641129596025400?thread_ts=1640966595.016600&cid=C3PQML5NU I personally just stopped using the shortcuts btw.
    Konstantin Tskhovrebov

    Konstantin Tskhovrebov

    7 months ago
    Main problem is any misconfiguration of project doesn't register the embed... task. It was my mistake to do this way. In 1.6.20 it should be better because the embed... task is registered anytime (if there are ios targets)