2

我正在尝试使用 swiftpm 重构项目,并且在模拟器和我的 iPhone 设备上一切正常。但是当我归档项目时,我得到一个错误'没有这样的模块'SFS2XAPIIOS''。

在此处输入图像描述

这是我的代码Package.swift

// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "BaseIM",
    platforms: [
        .iOS(.v11)
    ],
    products: [
        .library(name: "BaseIM", targets: ["BaseIM"]),
        .library(name: "SFS2XAPIIOSX", targets: ["SFS2XAPIIOS"])
    ],
    dependencies: [
        .package(name: "BaseTools", url: "http://192.168.1.28:8888/kevin/basetools.git", .branch("master")),
        .package(name: "BaseClass", url: "http://192.168.1.28:8888/kevin/baseclass.git", .branch("master")),
        .package(name: "MediaKit", url: "http://192.168.1.28:8888/kevin/mediakit.git", .branch("master")),
        
        .package(name: "Realm", url: "https://github.com/realm/realm-cocoa", .upToNextMajor(from: "10.1.4"))
    ],
    targets: [
        .target(
            name: "BaseIM",
            dependencies: [
                "SFS2XAPIIOSX", "BaseTools", "BaseClass", "MediaKit",
                .product(name: "RealmSwift", package: "Realm")
            ]
        ),
        .target(
            name: "SFS2XAPIIOSX",
            dependencies: [
                "SFS2XAPIIOS"
            ],
            path: "SFS2XAPIIOS",
            cSettings: [
                .headerSearchPath("Header.h")
            ]
        ),
        .binaryTarget(name: "SFS2XAPIIOS", path: "SFS2XAPIIOS/SFS2XAPIIOS.xcframework"),
        .testTarget(
            name: "BaseIMTests",
            dependencies: ["BaseIM"]),
    ]
)

在此处输入图像描述

4

0 回答 0