Binary target doesn't pass into build stage within swift build
.
Here's the Package.swift
example that if failing to be build.
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "DepTest",
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "DepTest",
targets: [
"DepTest",
"YandexMobileMetrica"]),
.library(name: "YandexMobileMetrica", targets: ["YandexMobileMetrica"]),
],
dependencies: [
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "DepTest"
),
.binaryTarget(
name: "YandexMobileMetrica",
url: "https://storage.mds.yandex.net/get-appmetrica-mobile-sdk/48248/YandexMobileMetrica-4.5.0-ios-spm-740398ad-b43a-486f-ba68-138c9fc0cc2b.zip",
checksum: "f1a6a851093559c440a037241f6571b4650a4aa0360859cc8849c9f77dc6e994"
),
.testTarget(
name: "DepTestTests",
dependencies: ["DepTest"]),
]
)
And the DepTest.swift
// The Swift Programming Language
// https://docs.swift.org/swift-book
import YandexMobileMetrica // error: `no such module`.
import Foundation