How to name graphic files for iPhone 5? - ios

The iPhone 5 has just launched, so I was wondering if anyone knows how graphics files are going to be renamed for the iPhone 5?
The resolutions are different between the iPhone 4S and the iPhone 5, so I assume there will also be a new naming strategy applied for iPhone 5 graphics? #3x maybe?

The iPhone 5 is still a Retina display, with two pixels for every point. That's what the #2x suffix for graphics is used to indicate, so the same suffix will be used here.
As others have suggested, there is one new piece of required artwork in the Default-568h#2x.png startup image, without which it appears your application will not be recognized as supporting the iPhone 5's display.
Beyond that, the only reason you would need special graphics for the iPhone 5 is if you had keyed something off of the overall dimensions of the screen. In that case, you'll need to detect the main screen's frame and substitute appropriate graphics at runtime using your own naming convention.

-568h#2x.png scheme doesn't work right now for graphics other then splashscreen, so for today there's no way.

Related

ios, publish different build per device

Google Play allows different apks per screen density, does Apple Store support this?
I'm sure the info is somewhere, but all I find when I search are people asking how to develop one app to support all devices.
I know how to do that already, but this specific (top secret) project will be 1000 times better if I can release one super optimized version for each screen resolution... but I'll settle for density or device (generation and type) if needed.
I don't have access to XCode (no Mac) to check options currently.
Bonus points: If possible, is Apple going to frown on this and possibly reject my app because of this?
This can't be done. If your app supports the iPhone then it must support both 4" and 3.5" inch iPhones. If it supports only iOS 7 then you can avoid non-retina devices because only retina devices can run iOS 7.
But if you support the iPad you must support both retina and non-retina.
You can have one app (Universal) that does it all or you can have separate iPhone and separate iPad apps. But the iPhone app must support both sizes and possibly both types (retina and non-retina) of screens. And the iPad app must support both types of screens.
Apple won't accept apps that don't support the differences.
It should also be pointed out that in the Interface Builder part of Xcode, you setup the UI with points and not pixels. So, for an iPad, when you place a button, you do not have to specify retina or not. On a Retina screen a point is 2x2 pixels and on a non-retina screen a point is 1x1 pixels. Also, with image assets, you have a single image asset you ask for in code, but you add multiple copies of the image in the image assets. Like the retina and non-retina copies. If you have an image named cat.png, for retina this would be cat#2x.png and for non-retina it would be cat.png. But, in code or the inspector you would reference it with imageNamed:#"cat" and Objective-C is designed to handle the rest.

Is it possible to use non-retina graphics on retina?

I got non retina graphics from a graphic designer to use with an app. The splash screen has a resolution of 400x640. And yet I am supposed to make a universal iphone 5 and ipad app using this graphics. It is in a .jpg file.
My question is, is it possible to use such low resolution images (400x640) on a retina iPad which requires 1536x2048 pixel images? Or should I get images of proper resolution?
You can see on the Apple's developer page that you must meet some graphic requirements for you app. If it's possible to ask for proper resolutions I believe it would be the best.
You can find more information here to pass it to your graphic designer
You can also read here more exactly what is required and what not if you want to get your app in the store
The aspect ratios of the images are different for a start.
Also, IIRC, if you don't have a default image that is 568 points tall, then your app will run letterboxed on 4 inch phone screens.

How does JSTileMap handle retina and ipad/iphone tile maps?

I have created a basic tilemap using Tiled. I am using JSTileMap with SpriteKit to get the map in the scene. As I understood, JSTileMap (rather SKTexture) handles the retina and different devices automatically. I have not been able to produce good results so far, here is my setup:
I have one .tmx file created at a base resolution using map.png as it's tile set. The .tmx is present in the project but I purposely did not add map.png (I do not want to support non-retina iPhones).
In the project I only added the following .png's:
map#2x~iphone.png (retina iPhones, using 48x48 tiles)
map~ipad.png (non-retina iPads, using 48x48 tiles)
map#2x~ipad.png (retina iPads, using 96x96 tiles)
Here are the results I get (after clean builds and reset content and settings on simulator):
Retina iPhone - tiles is wrong spots
iPad - no tilemap displayed, JSTileMap has parsing error
Retina iPad - tiles in wrong spots
If I use just a plain vanilla map.png (with 48x48 tiles):
Retina iPhone - tile map displays well but too large of course
iPad - tile map displays perfectly
Retina iPad - tile map display perfectly and is scaled.
I know I could just use a 24x24 tile map.png and apparently it will scale everything. I would prefer not to use scaled tile sets as the quality would suffer.
Thanks in advance.
E
I was able to narrow down that SKTexture ignores the ~ipad file extension for the #2x file extension. This only created more headaches in trying to build a tile map system for iPhone retina, iPad, and iPad retina.
I have decided to avoid the problem all together. I am not using a universal app in my project now. I have a iPhone project and a separate iPad Project. This way all I need to do to work with Retina is the #2x file extension in each project.
This does fully work (much easier). A word to the wise to those only building for retina iPhones... half your tile height and width sizes in the .tmx files, otherwise you will have a great time trying to deal with the content scaling.
Since you're using Sprite Kit and that requires iOS 7 there's actually no non-Retina iPhone to target anyway.
The thing in that instance is that you can't use #2x suffixed images without providing the same image without the #2x suffix. So the solution may be as simple as supplying the Retina iPhone images without the #2x suffix. You likely don't even need the ~iphone suffix either because the other two types of assets will only be used by the iPad devices.
This is based on an answer to a different question. I haven't personally verified it.

Xcode iPad resolution in landscape mode

I`m new at iOS development. I have seen that the new iPad 3 have an 1536x2048 resolution. And I asked from my designer that all the design should be in that resolution, but now i see that i have to resize every image, button and background to fit xcodes story board. How in xcode i can set the development resolution to 1536*2048?
You don't. Xcode uses points to reference pixels and automatically uses the correct graphics depending on the device. You have to make two copies of your image, "image" and "image#2x".
You do all of your development with "image" and iOS will automatically use the #2x version if the device is retina.
Your HD images should have #2x suffix. See "Specifying High-Resolution Images in iOS" section of Resource Programming Guide,
1536x2048 is the resolution of the screen (in pixel) but in xcode you are working with points. So ipad3 has still 1024x786 points (the same as in ipad2) but you can go to the point 0.5 for example.

iPad Retina development

If I currently have an ipad app that supports ios 5.0 how do I go about merging my graphics to fit flush on an ipad 3 & ios 5.1?
I have been looking through these apple docs, but I'm not finding anything about 5.0 to 5.1 conversion. Any tips?
I just want to be able to use high resolution graphics. My current graphics are all pixelated on the 5.1 sim.
Thanks!
You'll need to update your apps with #2x versions of your iPad graphic assets, at a minimum. So for MyImage.png you'll need a double-size version named MyImage#2x.png. If you have a universal app, and say, the following 3 images for iPhone, iPhone Retina, and iPad:
MyImage.png
MyImage#2x.png
MyImage~ipad.png
you would need to create MyImage#2x~ipad.png.
I think I have that right.... Could be that in this case the iPhone images would have ~iphone in their names too, but I don't think that is a requirement. (It's allowed, but not a requirement, I believe.)

Resources