GetCurrentDisplayMode on iPhone 6/6s/7 returns 960x640


I am trying to get the display mode for iPhone 6/6s/7 with GetCurrentDisplayMode or with GetDisplayMode, and the biggest display mode I can get is 960x640.

What is going wrong?

Paging @slime, does Maarten need some Info.plist entry or something to enable native resolution? Or is this not counting space used by the status bar, or…?

Apple only exposes the native resolution to apps if the app has a launch screen (nib/xib/storyboard file) or properly sized launch images:

1 Like

@icculus @slime hey guys! Thanks fro the fast reply, I am not sure if I am setting the a launch Image right or the info.list so I will try those! thanks again!

1 Like

If you want to use launch images instead of the newer Launch Screen, you’ll need to have an Images.xcassets which contains multiple launch images - one for each resolution that modern iOS devices have.

1 Like

@slime Thanks I do actually want Launch Image and not the screen, I will be looking into it.
Thanks again!

1 Like


try this : hopefully your code is objective-C compliant…
#import <UIKit/UIKit.h>

CGRect screenBound = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenBound.size;
CGFloat screenWidth = screenSize.width;
CGFloat screenHeight = screenSize.height;

Thanks, actually setting a Launch screen, or a Launch Image seams to fix the problem.