Ios 在Xcode 11中通过Fastlane构建SPM包不起作用

Ios 在Xcode 11中通过Fastlane构建SPM包不起作用,ios,swift,xcode,fastlane,swift-package-manager,Ios,Swift,Xcode,Fastlane,Swift Package Manager,我最近将我的包管理器从Cocoapods更新为SPM,因为Xcode 11已经集成了它。我所有的库都支持SPM,所以我尝试了一下。在Xcode调试构建过程中一切正常,但我目前正在使用Fastlane自动化部署和测试过程,我的spm包在测试步骤中失败,因为我的包不支持MacOs,但某些依赖项支持MacOs,所以它试图以某种方式迫使我提供MacOs支持。不幸的是,我现在不能这么做 你知道我是否错误地使用了spm,或者这是spm的一个bug吗? RxSwift也支持MacOs,但spm似乎对这个特定的

我最近将我的包管理器从Cocoapods更新为SPM,因为Xcode 11已经集成了它。我所有的库都支持SPM,所以我尝试了一下。在Xcode调试构建过程中一切正常,但我目前正在使用Fastlane自动化部署和测试过程,我的spm包在测试步骤中失败,因为我的包不支持MacOs,但某些依赖项支持MacOs,所以它试图以某种方式迫使我提供MacOs支持。不幸的是,我现在不能这么做

你知道我是否错误地使用了spm,或者这是spm的一个bug吗? RxSwift也支持MacOs,但spm似乎对这个特定的包没有问题,只有翠鸟、RxSwiftExt和柳树受到影响

这就是错误:

error: the product 'Kingfisher' requires minimum platform version 10.12 for macos platform
error: the product 'RxSwiftExt' requires minimum platform version 10.11 for macos platform
error: the product 'Willow' requires minimum platform version 10.11 for macos platform
这是我在fastlane/swift的测试报告

swift test --build-path ./build --package-path Core --configuration debug
这是我的包裹,斯威夫特

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

import PackageDescription

let package = Package(
    name: "Core",
    platforms: [
        .iOS(.v11)
    ],
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "Core",
            type: .static,
            targets: ["Core"]),
    ],
    dependencies: [
        // Local Dependencies
        .package(path: "../RxKingfisher"),
        // Remote Dependencies
       .package(url: "https://github.com/Nike-Inc/Willow.git",   Package.Dependency.Requirement.branch("master")),
        .package(url: "https://github.com/ReactiveX/RxSwift", .branch("master")),
        .package(url: "https://github.com/Quick/Nimble", .branch("master")),
        .package(url: "https://github.com/Quick/Quick", .branch("master")),
        .package(url: "https://github.com/realm/realm-cocoa", .branch("master")),
        .package(url: "https://github.com/RxSwiftCommunity/RxRealm", .branch("master")),
        .package(url: "https://github.com/RxSwiftCommunity/Action", .branch("master")),
        .package(url: "https://github.com/RxSwiftCommunity/RxSwiftExt", .branch("master")),
        .package(url: "https://github.com/onevcat/Kingfisher", .branch("master")),
        .package(url: "https://github.com/Swinject/Swinject", .branch("master")),
        .package(url: "https://github.com/RxSwiftCommunity/RxDataSources", .branch("master")),
        // We need to change to the master branch after it was merged
        .package(url: "https://github.com/jrendel/SwiftKeychainWrapper", Package.Dependency.Requirement.revision("8b0da97503be8db3b008581a30fdec71046136a7"))
    ],
    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 which this package depends on.
        .target(
            name: "Core",
            dependencies: [
                // Remote
                "Realm", "RealmSwift", "RxDataSources", "RxRealm", "Kingfisher", "RxSwift", "Action", "SwiftKeychainWrapper", "RxSwiftExt", "Swinject", "Willow",
                // Locals
                "RxKingfisher"
            ]),
        .testTarget(
            name: "CoreTests",
            dependencies: ["Core", "Quick", "Nimble", "RxTest", "RxBlocking"])
    ]
)



不确定
swift
命令的语法,但是通过
xcodebuild
设置目标帮助了我

xcodebuild-quiet clean test-project-YourProject.xcodeproj-scheme-YourScheme-destination'platform=iOS模拟器,name=iphone8'


似乎在Package.swift中为
平台设置iOS时,您仍然可以使用Mac作为可用的构建目标,它位于列表的开头,最终在本例中使用。

我也有同样的问题,有什么帮助吗?