Swift test give error “Undefined symbols for architecture x86_64”

I managed to successfully build and test your package by doing the following modifications: renamed the package name to VnkSwift, for some reasons the build tool doesn’t like dashes in package name, nor it works when you have underscores in the generated package name (so renaming the package to vnk_swift to make sure the import … Read more

How to include assets / resources in a Swift Package Manager library?

The package manager does not yet have any definition for how resources will be bundled with targets. We are aware of the need for this, but don’t yet have a concrete proposal for it. I filed https://bugs.swift.org/browse/SR-2866 to ensure we have a bug tracking this. Using Swift 5.3 it’s finally possible to add localized resources … Read more

Use resources in unit tests with Swift Package Manager

Swift 5.3 See Apple Documentation: “Bundling Resources with a Swift Package” Swift 5.3 includes Package Manager Resources SE-0271 evolution proposal with “Status: Implemented (Swift 5.3)“. Resources aren’t always intended for use by clients of the package; one use of resources might include test fixtures that are only needed by unit tests. Such resources would not … Read more

Generating resource_bundle_accessor, Type ‘Bundle’ has no member ‘module’

SPM generates the resource_bundle_accessor only if the corresponding target contains resources as the argument like: .target( name: “ChenzookKit”, dependencies: [“Apollo”], resources: [.process(“Resources”)] // <- `copy` or `process` doesn’t really matter ), Also, note that it should be a valid resource path. AND❗️ The project MUST contains Resources inside the target’s Directory! AND❗️❗️ The Resources MUST … Read more

Xcode 13.3 beta 3: “swift package init” shows warning: “~/Library/org.swift.swiftpm/collections.json has been deprecated” but dunno how to use new one

I faced this problem after I installed Xcode 14.0. Deleting org.swift.swiftpm worked for me: Make sure that anything related to SPM is not running including Xcode. Close them all before you delete anything. Go to directory and delete the entire org.swift.swiftpm directory (Not only collection directory, but the whole org.swift.swiftpm directory) and if there is … Read more

tech