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

Hello,

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:

https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/
https://useyourloaf.com/blog/using-a-launch-screen-storyboard/

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. https://medium.com/@jigarm/ios-app-icon-and-launch-image-sizes-e8d5990cb72b

1 Like

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

1 Like

Hi,

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.