swift-package-manager

Type 'Bundle' has no member “module”

元气小坏坏 提交于 2020-12-11 00:57:41
问题 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)],

Swift Package Manager - Type 'Bundle' has no member “module” error

戏子无情 提交于 2020-12-07 04:57:46
问题 Working on implementing SPM for a framework, and got stuck on the Type 'Bundle' has no member “module” error. I have seen two other recent posts about this here and here, but following all the steps, it is still not working for me, no resource_bundle_accessor file is generated. I asked about my Package.swift file here, and that has been answered and resolved. For completeness here's the file: // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required

Swift Package Manager - Type 'Bundle' has no member “module” error

大兔子大兔子 提交于 2020-12-07 04:55:25
问题 Working on implementing SPM for a framework, and got stuck on the Type 'Bundle' has no member “module” error. I have seen two other recent posts about this here and here, but following all the steps, it is still not working for me, no resource_bundle_accessor file is generated. I asked about my Package.swift file here, and that has been answered and resolved. For completeness here's the file: // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required

Consume Swift Package for multiple targets and platforms in a project?

早过忘川 提交于 2020-11-26 05:01:10
问题 I have a project with multiple targets, such as an iOS app, a watchOS app, and some frameworks. How can I assign the same Swift Package to all my targets? Xcode only let's me select one: If I try to add the Swift Package again so I can try assigning it to another target in my project, I get an error: What is the correct way to do this? Below is what the package manifest looks like in the Swift Package. Is there something to be done on that side or something I have to do different in Xcode?

Consume Swift Package for multiple targets and platforms in a project?

让人想犯罪 __ 提交于 2020-11-26 04:57:30
问题 I have a project with multiple targets, such as an iOS app, a watchOS app, and some frameworks. How can I assign the same Swift Package to all my targets? Xcode only let's me select one: If I try to add the Swift Package again so I can try assigning it to another target in my project, I get an error: What is the correct way to do this? Below is what the package manifest looks like in the Swift Package. Is there something to be done on that side or something I have to do different in Xcode?