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.
Post
Replies
Boosts
Views
Activity
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")