In one of my XCTests
classes, I need to load up an image from an asset catalogue to test an image processing logic. However, it seems like using UIImage(named: "imageName")
returns nil
in the testing target.
I checked the testing target membership in my Asset Catalogue, is there anything else I should do to enable reading of the image from my XCTest
classes?
According to the documentation, you have to add them at runtime.
In Swift, it would be something along the lines of: