multiplatform-swiftpackage icon indicating copy to clipboard operation
multiplatform-swiftpackage copied to clipboard

createXCFramework / createSwiftPackage task FAILED

Open abhimuktheeswarar opened this issue 4 years ago • 1 comments

> Task :xxx:createXCFramework FAILED
Both watchos-arm64_32 and watchos-armv7k represent two equivalent library definitions.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dryrun:createXCFramework'.
> Process 'command 'xcodebuild'' finished with non-zero exit value 70

Xcode version: Version 12.5.1 (12E507) on Intel Mackbook Pro running macOS Big Sur.

A snippet of the project build.gradle.kts

plugins {
    id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3"
}

kotlin {
    ios()
    watchos()
    tvos()
    macosX64()
}
multiplatformSwiftPackage {
    swiftToolsVersion("5.3")
    packageName(project.name)
    outputDirectory(File(projectDir, "swiftpackage"))
    targetPlatforms {
        iOS { v("5") }
        tvOS { v("9") }
        macOS { v("10") }
        watchOS { v("4") }
    }
}

It is working only if remove the watchOS target. Looks like, this is related to this issue: https://developer.apple.com/forums/thread/666335

abhimuktheeswarar avatar Jul 04 '21 18:07 abhimuktheeswarar

I just ran into the same issue. Ktor 1.6.2 finally fixed the watchOS x64 target, but when I run the createXCFramework task, I get the same error as above. Same Xcode 12.5.1. (Xcode 13 beta 4 fails the multiplatform build fails for me in other areas.)

Both watchos-arm64_32 and watchos-armv7k represent two equivalent library definitions.

I hope there might be a solution that can be built into the plugin, based on the linked Apple Dev thread???

tylerwilson avatar Jul 30 '21 15:07 tylerwilson