iPad orientation issue

My iPad app supports only portrait orientation.

But Apple says.

“Your iPad app must support all orientation”

So, I use the orientation settings like below.

orientation = {

    default = “portrait”,

    supported = { “portrait”, “portraitUpsideDown”, “landscapeLeft”, “landscapeRight” }

},

And my question…

How can I prevent other orientation except portrait in AppCoronaDelegate?

My code below doesn’t work.


  • (BOOL)shouldAutorotate

{

    return FALSE;

}

  • (NSUInteger)supportedInterfaceOrientations

{

    return UIInterfaceOrientationMaskPortrait;

}


How can I fix it?
I wanna set the corona view to portrait orientation force at start and fix it to portrait.

I want to know if it is possible. )-:

Did you try changing it in build.settings? Check out this document: https://docs.coronalabs.com/native/ios/index.html#setting-orientation

Where did you get this from:

But Apple says.

“Your iPad app must support all orientation”

Did they write you and tell you this or is it something you saw in a document?

I ask, because that makes NO sense.  Many games only support a single orientation, or a normal and inverted orientation.

@roaminggamer

Have you recently uploaded an app that supports the iPad?
Xcode does not upload and displays an error window. :slight_smile:

@vlads

Yes. I did it. But it doesn’t work.

The only way I think is to inherit AppViewController or provide member variables to control shouldAutorotate, supportedInterfaceOrientations.

Thank you. :slight_smile:

If you only support portrait then your build.settings should look like this

orientation = {     default = "portrait",     supported = { "portrait", "portraitUpsideDown" },

The Apple message is probably saying that in landscape your app doesn’t look good?

  1. Your “app” has to support all orientations.

  2. Corona view controller can support only selected orientations, which can be set by plist values.

When orientations are in build.settings, they would build automatically to plist settings both on Native and Simulator builds.

I fixed it. I got a hint.

I guess ‘Requires full screen’ is point.

Thank you. :slight_smile:

I still don’t understand the use of the word requires in this thread.

By requires are we saying

  1. Corona must be able rotate the screen if the feature is enabled, but the feature need not be enabled for all orientations.

  2. All rotations must be enabled and no matter how the user holds the screen, the app must rotate the screen to display correctly.

If #2 I don’t understand why this would be a requirement.  As a user I wouldn’t want my screen flipping around as I play a game that is best suited for portrait (or landscape).

PS - Also, it’s been a few months since I uploaded one of my own apps, but I just had a client upload an app a few weeks ago that ONLY supports portrait.

I mean…below…

blog%2F2018%2Fipad_orientation.png?alt=m

Sorry.  I don’t recognize that interface.  Looks like a dialog for a native build in xCode to me.  If so, I’ve stumbled into a native discussion accidentally.

How can I fix it?
I wanna set the corona view to portrait orientation force at start and fix it to portrait.

I want to know if it is possible. )-:

Did you try changing it in build.settings? Check out this document: https://docs.coronalabs.com/native/ios/index.html#setting-orientation

Where did you get this from:

But Apple says.

“Your iPad app must support all orientation”

Did they write you and tell you this or is it something you saw in a document?

I ask, because that makes NO sense.  Many games only support a single orientation, or a normal and inverted orientation.

@roaminggamer

Have you recently uploaded an app that supports the iPad?
Xcode does not upload and displays an error window. :slight_smile:

@vlads

Yes. I did it. But it doesn’t work.

The only way I think is to inherit AppViewController or provide member variables to control shouldAutorotate, supportedInterfaceOrientations.

Thank you. :slight_smile:

If you only support portrait then your build.settings should look like this

orientation = {     default = "portrait",     supported = { "portrait", "portraitUpsideDown" },

The Apple message is probably saying that in landscape your app doesn’t look good?