Landscape mode does not work on iPad

I am using Cocos2d-x 3.2 and I have problems activating the landscape mode on iPad retina. I always get “surface size: 1536x2048” (instead of 2048x1536). This happens only on device, on iOS simulator it works correctly.
I already did the following:

  1. set General->deployment info to landscape

  2. in RootViewController.mm:

    • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      return UIInterfaceOrientationIsLandscape( interfaceOrientation );
      }

    // For ios6, use supportedInterfaceOrientations & shouldAutorotate instead

    • (NSUInteger) supportedInterfaceOrientations{
      #ifdef __IPHONE_6_0
      return UIInterfaceOrientationMaskLandscape;
      #endif
      }

    • (BOOL) shouldAutorotate {
      return YES;
      }

  3. Added an asset catalog with all required launch images in the correct resolutions.

Is there something I missed?

Are you telling Xcode that Landscape is an OK option?

Yes, I checkmarked Landscape Left and Landscape Right.