We have four images at 3x resolution in an atlas folder in Xcode.
Inside the atlas folder, the image names are: 0@3x.png
, 1@3x.png
, 2@3x.png
, and 3@3x.png
.
The code for loading these images:
// Set vars
let placeholderAtlas = SKTextureAtlas(named: PlaceholderAtlasFilename)
// Get number textures
let numPlaceholders = placeholderAtlas.textureNames.count
// Load placeholder sprites
for i in 0..<numPlaceholders {
let textureName = String(i)
let texture = placeholderAtlas.textureNamed(textureName)
placeholderTextures.append(texture)
}
These images appear when we run the iOS 10 simulators, but the images do not appear on the iOS 9 simulators. The red X marks appear, suggesting the images were not found.
This was true for the following devices: iPhone 5s, iPhone 6, and iPhone 6s Plus.
In the console, there are no errors about loading these images.
Does this mean the images also won't load on real devices? We don't have iOS 9 test devices.
How can we fix this problem?