11

I have several games made with Cocos2d-iphone. All of them are old projects created with Xcode 4 or 5. All games scale fine on the new iPhone 6 and 6 Plus except one that seems to avoid the scaling mode and is running on native iPhone 6/6 Plus resolution. The project does not contain Launch images with the resolutions that seem to disable the scaling mode as explained here

Is there anything else that unlocks the native resolutions? I want the game to run in scaling mode for now until the HD assets are ready for the new resolutions.

I've made a new empty project that does not have any assets and it is working with the native screen sizes.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Dunbar
  • 401
  • 5
  • 9
  • The only way an app runs at native iPhone6/6+ sizes is if you add the proper launch images or, for iOS 8, a "Launch Screen File". – rmaddy Sep 17 '14 at 15:03
  • Also if you add "Launch Screen File". The problem is that I don't use any of these settings and native Resolution is unlocked. The difference between this project and the ones that work in scaling mode is that I have a splash screen for the Retina iPad named Default-Portrait@2x.png. Also the old projects are with Cocos2d-iphone 1.x but the new one is with 2.x. Another difference is that the old projects are submitted and live in AppStore. – Dunbar Sep 18 '14 at 06:20

2 Answers2

10

1. Is there anything else that unlocks the native resolutions?

No for older projects you can only unlock native resolutions by adding launch images

2.I've made a new empty project that does not have any assets and it is working with the native screen sizes.

If you create project from XCode 6 naive resolution will be automatically enabled even if launch images are not added. I just created new sample project from Xcode 5.1.1 and than ran it on Xcode 6 and naive resolution was not enabled and views were scaled in order to fit the screen.

Hope that clears the confusion as your project are old as you mentioned naive resolution will not be enabled unless you add launch images.

Correction

Based on comments i am correcting my answer for projects created in XCode 6 you can delete Launch Screen File and also not add any iPhone 6/6+ specific launch images. The app will not run in native iPhone 6/6+ resolution.

So For iOS8 you can have either Launch images for iPhone 6 and 6 Plus or a Launch Screen File

brandonscript
  • 68,675
  • 32
  • 163
  • 220
Bhumit Mehta
  • 16,278
  • 11
  • 50
  • 64
  • I can't confirm that. I've tried removing the Launch Screen File on the new project and the screen size was 320x480. On my old project I do not have Launch Screen File nor Launch images. I tried many things but nothing worked! – Dunbar Sep 17 '14 at 14:34
  • You mean you created new project from XCode 5.x and still naive resolution was unlocked? Remember creating project from XCode 6 will unlock naive resolution by default. – Bhumit Mehta Sep 17 '14 at 14:36
  • 2
    Sorry but this answer is mostly incorrect (or at least misleading). Create a new project in Xcode 6. Remove the default "Launch Screen File" and don't add any iPhone 6/6+ specific launch images. The app will **not** run in native iPhone 6/6+ resolution. The **only** way, for any app, to run at native resolution is to provide either the proper launch images or, for iOS 8, a "Launch Screen File". – rmaddy Sep 17 '14 at 15:00
  • 1
    I have create a new project in XCode 6. I have removed LaunchScreen.xib from my project. I don't have any iPhone 6 or 6+ launch images. Still, the app runs in native resolution. So there is another missing piece here. – etayluz Nov 10 '14 at 05:54
9

Bhumit is partially right, but I believe there is one missing detail. To disable native resolution (and ensure scaled resolution) I did the following:

  1. Remove LaunchScreen.xib from project as well as any iPhone 6/6+ launch images you may have.
  2. In your app's target, go to General, and under "Launch Screen File" blank out the entry.
  3. Clean and rebuild
etayluz
  • 15,920
  • 23
  • 106
  • 151
  • For me I had "Launch Image Source" set with the Default.pngs for each resolution in the asset catalog. Removing the "Retina HD 5.5" and "Retina HD 4.7" images from the catalog did the trick. – Erik Villegas Nov 13 '14 at 20:11
  • Note that you'll still have to provide the `Default-568h@2x.png` startup image to test your application with the iPhone 5/5S size. – Marius Schulz Feb 17 '15 at 17:20
  • Any idea about how to disable native resolution (ensure scaled resolution) for iPhone X ? – Yahya Ibrahim Sep 20 '17 at 06:31
  • I actually want the opposite. I want native resolution for the iPhone X, but scaled for everything below. :) – Joris Weimar Sep 27 '17 at 12:55