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")
Nov ’24
Reply to How to define icons for exported type identifier?
I have the exact same issue. Tried looking everywhere online for a fix or a workaround, but haven't found anything that works yet. Really disappointing.
Replies
Boosts
Views
Activity
Mar ’24
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")
Replies
Boosts
Views
Activity
Nov ’24