[ad_1]
I’ve 2 native Swift Packages: LibA and LibB.
Each LibA and LibB relies on a similar framework(AmazonIVSPlayer).
I need to add each of the into my Undertaking however I acquired the beneath error:
A number of targets named ‘AmazonIVSPlayer’ in
LibAandLibB
the Bundle.swift of each libraries are like beneath:
import PackageDescription
let bundle = Bundle(
title: "LibA",
merchandise: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "LibA",
targets: ["LibA","AmazonIVSPlayern"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "LibA",
dependencies: []),
.binaryTarget(
title: "AmazonIVSPlayer",
url: "https://participant.live-video.internet/1.8.1/AmazonIVSPlayer.xcframework.zip",
checksum: "8256f9f580fdb09b156afad43cd17dd120091c794e848b27aad83c1a098ecc7f")
]
)
I learn
- Swift Bundle Supervisor: “a number of targets named…”
- Swift Bundle Supervisor (SPM) and Cocoapod Dependency Battle
- Swift packages and conflicting dependencies
- https://boards.swift.org/t/multiple-target-issue-with-spm/16696
- https://www.reddit.com/r/swift/feedback/d4wwbk/question_about_dependency_conflicts_in_swift
Since none of them supply any resolution and all posts are outdated, I’m questioning is there any new technique to resolve this difficulty?
[ad_2]
