Handle iPhone 6 and iPhone 6 plus size in cocos2d - ios

I am developing new game with support of iPhone 6 and iPhone 6 plus. I know the size's
iPhone 6 : 750 X 1334 pixels (4.7inches)
iPhone 6 Plus : 1242 X 2208 pixels (5.5inches)
How can i handle this sizes in cocos2d.
How can identify the iPhone (3.5inches, 4inches, 4.7inches, 5.5inches).
Can any one help me.

Related

What Simulator devices are currently needed to make screenshots for Apple App Store?

I ask this question as instead of getting to this information quickly I had to search for it in a more complicated manner.
So, what Simulator devices are needed to make screenshots for all resolutions that are now required to publish or update an application in the App Store?
I believe this can be helpful to a lot of developers as the error message while uploading images is not very helpful.
As of Feb 2023:
For iPhone 6.7" Display, use iPhone 14 Pro Max
For iPhone 6.5" Display, use iPhone 13 Pro Max
For iPhone 5.5" Display, use iPhone 8 Plus
For iPad Pro (3rd Gen) 12.9" Display, use iPad Pro (12.9-inch)
For iPad Pro (2nd Gen) 12.9" Display, use iPad Pro (12.9-inch)
(So, for the iPads, you only need one device.)
Here's how it looks like in practice.
Have fun!
So now in 2019 you need to supply images for 4 devices, for iPhone 6.5 screen you need iPhone XS max simulator and
for iPhone 5.5 you need a iPhone 8 Plus simulator.
Then you need also iPad Pro second as well as third generation but that is quite obvious.
iPhone app
iPhone 6.5-inch (iPhone XS Max / XR): 1242 x 2688 px or 2688 x 1242 px
iPhone 5.5-inch (iPhone 6/6s/7/8 Plus): 1242 x 2208 px or 2208 x 1242 px
iPad app
iPad 12.9-inch (iPad Pro 3rd Gen.): 2048 x 2732 px or 2732 x 2048 px
iPad 12.9-inch (iPad Pro 2nd Gen.): 2048 x 2732 px or 2732 x 2048 px
I was able to upload the 2nd Gen. "old" screenshots to the newer 3rd Gen. screenshots and they go consistently through review, without any issues.
Universal app
iPhone 6.5-inch (iPhone XS Max / XR): 1242 x 2688 px or 2688 x 1242 px
iPhone 5.5-inch (iPhone 6/6s/7/8 Plus): 1242 x 2208 px or 2208 x 1242 px
iPad 12.9-inch (iPad Pro 3rd Gen.): 2048 x 2732 px or 2732 x 2048 px
iPad 12.9-inch (iPad Pro 2nd Gen.): 2048 x 2732 px or 2732 x 2048 px
OCT 2022 (Xcode 14) - Devices/Simulators for required screenshot sizes
iPhone 6.5-inch: iPhone 11 Pro Max
iPhone 5.5-inch: iPhone 8 Plus
iPad 12.9-inch: iPad Pro 3rd Gen
iPad 12.9-inch: iPad Pro 2nd Gen
Pro Tip: If you don't see those devices, you can add them:
https://i.stack.imgur.com/Fs4JI.png
Apple Reference https://help.apple.com/app-store-connect/#/devd274dd925
Use iPad Pro (12.9-inch) (4th generation) for the iPad screenshots. Should work for both

Which #3x pictures shall I select in iPhone X and iPhone 8 Plus

I am doing a background image for iPhone.
On iPhone 8 plus, the resolution is 1242 x 2208 in pixel.
On iPhone X, the reslution is 1125 x 2436 in pixel.
Both of them require for #3x in iPhone App development.
My question : which reeslution shall I make for #3x ?

iTunesConnect app upload iOS Screenshot Properties

I'm uploading iphone app to app store which supports iOS 9 and above.
Do I need to upload screenshots for all the supported device or iPhone 6 plus(750 x 1334) is fine?
Do I need to upload screenshots for all the supported device or iPhone 6 plus(750 x 1334) is fine?
It's fine just upload iPhone 6 Plus images and App Store will take care of rest.
For App Previews please follow the Apple Guidelines here.
iPhone 5, iPhone 5c, iPhone 5s, and iPhone SE
1920 x 1080 or 1136 x 640 (Landscape)
1080 x 1920 or 640 x 1136 (Portrait)
iPhone 6, iPhone 6s, and iPhone 7
1334 x 750 (Landscape)
750 x 1334 (Portrait)
iPhone 6 Plus, iPhone 6s Plus, and iPhone 7 Plus
1920 x 1080 (Landscape)
1080 x 1920 (Portrait)
For App Store you need only 6Plus (Retina HD 5.5) screen shot
iphone 6plus -- 1242 * 2208 pixels
For ipad You need
iPad 12.9 inch -- 2048 × 2732 pixels
It is okay to submit the screenshots for a particular device. Apple will use it across device sizes.See this

Error for uploading image for live the app on iTunes [duplicate]

This question already has answers here:
iTunes Connect Screenshots Sizes for all iOS (iPhone/iPad/Apple Watch) devices
(19 answers)
Closed 6 years ago.
I want to live the app via iTunes, but when uploading the image(s), this error shows:
The dimensions of one or more screenshots are wrong.
What are the sizes for uploading for iPhone 3.5, 4, 4.7 and 5.5 inches?
You can take screenshots of the iPhone6plus simulator and upload your images. Remember to press command+1 to let the simulator screen 100%, and then press command+s screenshot.
iPhone 3+4 (3.5 Inch)
640 x 960
iPhone 5 (4 Inch)
640 x 1136
iPhone 6 (4.7 Inch)
750 x 1334
iPhone 6 Plus (5.5 Inch)
1242 x 2208
You need the screenshot in this resolution, the phone scales them down to 1080 x 1920
iPad (Air and Mini Retina)
1536 x 2048
iPad Pro
2048 x 2732
Apple Watch
312 x 390 pixels
(only one orientation)
The following resolutions are acceptable to iTunes connect:
iPhone 5 (4 Inch)
640 x 1136
iPhone 6 (4.7 Inch)
750 x 1334
iPhone 6 Plus (5.5 Inch)
1242 x 2208
iPad (Air and Mini Retina)
1536 x 2048
iPad Pro
2048 x 2732
Apple Watch
312 x 390 pixels
Make sure your screenshots follow these dimensions.
Size of app icon: 1024 x 1024
There is an update in iTunes known as Media manager in which you need to upload screenshots of just 5.5 inch & media manager will take care of rest of the sizes.
Hope this helps.

How does my app currently behaves on an iPhone 6 / iPhone 6 plus?

I got the following numbers for iPhone devices, from PaintCodeApp website
Device Zoom display Points Rendered pixels Scale
W H W H
iPhone 6 Plus Off 414 736 1242 2208 #3x
iPhone 6 Plus On 375 667 1125 2001 #3x
iPhone 6 Off 375 667 750 1334 #2x
iPhone 6 On 320 568 640 1136 #2x
iPhone 5 - 320 568 640 1136 #2x
iPhone 4 - 320 480 640 960 #2x
iPhone 3GS - 320 480 320 480 #1x
Since my apps were designed for iPhone 3GS up to iPhone 5, the supported points frames are 320x480#1x, 320x480#2x and 320x568#2x.
I assume that on an iPhone 6 with the zoom mode enabled, the display should be the exact same as the iPhone 5, since the points frame is 320x568#2x as well. This might be wrong, since I cannot find no confirmation.
Now, what I'm really wondering is how my apps shows on iPhone 6 with the zoom mode off, and on iPhone 6 plus with or without the zoom mode, since the points frames are 375x667#2x, 375x667#3x and 414x736#3x.
Apple Developer Support couldn't give me no hint nor documentation to read on the subject. Since I haven't bought the new devices, is there anyone who knows what actually happens with old apps ?
For those like me who wonder how are treated legacy apps, I did a bit of testing and computation on the subject.
Thanks to #hannes-sverrisson hint, I started on the assumption that a legacy app is treated with a 320x568 view in iPhone 6 and iPhone 6 plus.
The test was made with a simple black background bg#2x.png with a white border. The background has a size of 640x1136 pixels, it is black with an inner white border of 1px.
Below are the screenshots provided by the simulator :
iPhone 5 simulator : http://i.stack.imgur.com/b2E5K.png
iPhone 6 simulator : http://i.stack.imgur.com/4Qz8N.png
iPhone 6 plus simulator : http://i.stack.imgur.com/hQisc.png
What we can see on the iPhone 6 screenshot is a 1px margin on top and bottom of the white border, and a 2px margin on the iPhone 6 plus screenshot. This gives us a used space of 1242x2204 on iPhone 6 plus, instead of 1242x2208, and 750x1332 on the iPhone 6, instead of 750x1334.
We can assume that those dead pixels are meant to respect the iPhone 5 aspect ratio :
iPhone 5 640 / 1136 = 0.5634
iPhone 6 (used) 750 / 1332 = 0.5631
iPhone 6 (real) 750 / 1334 = 0.5622
iPhone 6 plus (used) 1242 / 2204 = 0.5635
iPhone 6 plus (real) 1242 / 2208 = 0.5625
Second, it is important to know that #2x resources will be scaled not only on iPhone 6 plus (which expects #3x assets), but also on iPhone 6. This is probably because not scaling the resources would have led to unexpected layouts, due to the enlargment of the view.
However, that scaling is not equivalent in width and height. I tried it with a 264x264 #2x resource. Given the results, I have to assume that the scaling is directly proportionnal to the pixels / points ratio.
Device Width scale Computed width Screenshot width
iPhone 5 640 / 640 = 1.0 264 px
iPhone 6 750 / 640 = 1.171875 309.375 309 px
iPhone 6 plus 1242 / 640 = 1.940625 512.325 512 px
Device Height scale Computed height Screenshot height
iPhone 5 1136 / 1136 = 1.0 264 px
iPhone 6 1332 / 1136 = 1.172535 309.549 310 px
iPhone 6 plus 2204 / 1136 = 1.940141 512.197 512 px
It's important to note the iPhone 6 scaling is not the same in width and height (309x310). This tends to confirm the above theory that scaling is not proportional in width and height, but uses the pixels / points ratio.
I hope this helps.

Resources