Viewing entries in
iOS development

Comment

Image naming conventions in Xcode

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

Comment

Renaming an application in Xcode 5

Comment

Renaming an application in Xcode 5

In a recent project I started with a name for my iOS application and later decided to change it. I tried to rename it as described in the Apple Technical Q&A QA1625 without success. For some reason the simulators targets were gone and the iOS device target was also gone.

After several attempts i found the problem. My project was embedded in an Xcode workspace. All I had to do was open the project (not the workspace) and do the rename from there. After that, I had to relink the project in the workspace. And that was it.

Comment