While developing a very simple SpriteKit game I wanted to have different images for different device resolutions using atlases. While there are plenty of pages describing how to include retina images (using @2X as a suffix), it was quite hard to find a description on how to specify that an image is for an iPad. Hence this post.
It turns out there is some documentation from Apple on how to do this. You can find it HERE. It does not cover the @2X suffix for retina displays. This might be described somewhere else.
For an iPad, you need to add ~ipad. Hence, the possible file names are:
- image@2X~ipad.png: Image for retina iPad
- image~ipad.png: Image for non-retina iPad
- image@2X.png: Image or retina display
- image.png: Default image
For an iPhone, the suffix is ~iphone. Hence:
- image@2X~iphone.png: Image for retina iPhone
- image~iphone.png: Image for non-retina iPhone
- image@2X.png: Image on retina display
- image.png: Default