Post

Replies

Boosts

Views

Activity

Reply to Using resources with Swift Testing
Just putting in an update here for anyone who stumbles upon this post and has a similar issue. This is resolved by adding this entry into your Package.swift file: .testTarget( name: "PackageNameTests", dependencies: ["PackageName"], resources: [ .copy("Resources/test.png") ] ) After that's all synced, you can use the below code to access the correct path to access the resource: Bundle.module.path(forResource: "test", ofType: "png")
1w