swift-package-manager

Can I specify a platform target when running swift test from the CLI?

自古美人都是妖i 提交于 2021-01-12 05:09:32
问题 My Package.swift looks something like let package = Package( name: "MyPackage", platforms: [ .iOS(.v13) ], products: [ .library( name: "MyPackage", targets: ["MyPackage"]) ], dependencies: [ .package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.0.0"), ], targets: [ .target( name: "MyPackage", dependencies: [ "SnapKit", ]), .testTarget( name: "MyPackageTests", dependencies: ["MyPackage"]) ] ) When I run swift test I get error: the library 'MyPackage' requires macos 10.10, but

Can I specify a platform target when running swift test from the CLI?

。_饼干妹妹 提交于 2021-01-12 05:08:10
问题 My Package.swift looks something like let package = Package( name: "MyPackage", platforms: [ .iOS(.v13) ], products: [ .library( name: "MyPackage", targets: ["MyPackage"]) ], dependencies: [ .package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.0.0"), ], targets: [ .target( name: "MyPackage", dependencies: [ "SnapKit", ]), .testTarget( name: "MyPackageTests", dependencies: ["MyPackage"]) ] ) When I run swift test I get error: the library 'MyPackage' requires macos 10.10, but

Github Actions: xcodebuild fails due to server fingerprint

人走茶凉 提交于 2020-12-26 06:33:52
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Github Actions: xcodebuild fails due to server fingerprint

不羁岁月 提交于 2020-12-26 06:28:01
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Generating resource_bundle_accessor, Type 'Bundle' has no member 'module'

烂漫一生 提交于 2020-12-22 08:22:34
问题 Some times Xcode can not determine the module parameter in the Bundle. Type 'Bundle' has no member 'module' My investigations show that SPM generates an extension on the module (some times) for this property automatically in a file called resource_bundle_accessor like: import class Foundation.Bundle private class BundleFinder {} extension Foundation.Bundle { /// Returns the resource bundle associated with the current Swift module. static var module: Bundle = { let bundleName = "ABUIKit

Generating resource_bundle_accessor, Type 'Bundle' has no member 'module'

萝らか妹 提交于 2020-12-22 08:12:46
问题 Some times Xcode can not determine the module parameter in the Bundle. Type 'Bundle' has no member 'module' My investigations show that SPM generates an extension on the module (some times) for this property automatically in a file called resource_bundle_accessor like: import class Foundation.Bundle private class BundleFinder {} extension Foundation.Bundle { /// Returns the resource bundle associated with the current Swift module. static var module: Bundle = { let bundleName = "ABUIKit

Generating resource_bundle_accessor, Type 'Bundle' has no member 'module'

做~自己de王妃 提交于 2020-12-22 08:11:17
问题 Some times Xcode can not determine the module parameter in the Bundle. Type 'Bundle' has no member 'module' My investigations show that SPM generates an extension on the module (some times) for this property automatically in a file called resource_bundle_accessor like: import class Foundation.Bundle private class BundleFinder {} extension Foundation.Bundle { /// Returns the resource bundle associated with the current Swift module. static var module: Bundle = { let bundleName = "ABUIKit

Type 'Bundle' has no member “module”

萝らか妹 提交于 2020-12-11 01:05:44
问题 I have tried solutions in this question: Generating resource_bundle_accessor, Type 'Bundle' has no member 'module' however it still does not work. I am trying to access a simple JSON file in my unit tests. Here is my 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: "MyLibrary", platforms: [.iOS("11.0"), .macOS(SupportedPlatform.MacOSVersion.v10_12)],

Type 'Bundle' has no member “module”

眉间皱痕 提交于 2020-12-11 01:05:25
问题 I have tried solutions in this question: Generating resource_bundle_accessor, Type 'Bundle' has no member 'module' however it still does not work. I am trying to access a simple JSON file in my unit tests. Here is my 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: "MyLibrary", platforms: [.iOS("11.0"), .macOS(SupportedPlatform.MacOSVersion.v10_12)],

Type 'Bundle' has no member “module”

半世苍凉 提交于 2020-12-11 00:57:48
问题 I have tried solutions in this question: Generating resource_bundle_accessor, Type 'Bundle' has no member 'module' however it still does not work. I am trying to access a simple JSON file in my unit tests. Here is my 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: "MyLibrary", platforms: [.iOS("11.0"), .macOS(SupportedPlatform.MacOSVersion.v10_12)],