I am doing a loop through my .launchimage images, in order to re-use the one I need in a different context, but when I do so, most of the UIImage return nil, like with AppLoginLaunchImage.launchimage/LaunchImage-Landscape~ipad_1024x768.png.
Image with name AppLoginLaunchImage.launchimage/LaunchImage.png works however. Why is that and what can I do to get all objects from my assets? ?
let allPngImageNames = Bundle.main.paths(forResourcesOfType: "png", inDirectory: "AppLoginLaunchImage.launchimage")
for imageName in allPngImageNames{
//guard let image = UIImage(named: imageName) else { continue }
let image = UIImage(named: imageName)
if (image == nil) {
continue
}