Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios Orientation.lockToLandscape() Error #272

Open
andrei0807 opened this issue Feb 19, 2018 · 11 comments
Open

ios Orientation.lockToLandscape() Error #272

andrei0807 opened this issue Feb 19, 2018 · 11 comments

Comments

@andrei0807
Copy link

andrei0807 commented Feb 19, 2018

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [RCCTabBarController shouldAutorotate] is returning YES'
*** First throw call stack:
What problem?
please help me

@diegotsi
Copy link

diegotsi commented Mar 8, 2018

Same issue here.

@Kouznetsov
Copy link

Can you allow both portrait and landscape but still lock it on only one of them ?

@andyesp
Copy link

andyesp commented Jun 8, 2018

I'm having the same issue. Did anyone find a solution?

@diegotsi
Copy link

Hey @andyesp, my workaround was create a timeout before lockToLandscape, Something like this

setTimeout(function(){ Orientation.lockToLandscape(); }, 100)

@rafaelbusetti
Copy link

I am using a component with webview and setTimeout did not solve =/

@Charlynux
Copy link

Got the same error.

There is my analysis (I know nothing on iOS native development, so this is mainly trial/error, code reading and logic) :

  • You request to lock to landscape so supportedInterfaceOrientationsForWindow returns now 'Landscape'.
  • You're phone is still in Portrait position. Portrait is not Landscape : Supported orientations has no common orientation with the application
  • Some controller somewhere says : You should be able to autorotate. [RCCTabBarController shouldAutorotate] is returning YES
  • iOS catches the incoherence and crashes.

As a workaround, I edit my controller.

  • Import "Orientation.h"
  • Changes return YES by return [Orientation getOrientation] == UIInterfaceOrientationMaskAllButUpsideDown
    Dirty but it works.

@jvitorr
Copy link

jvitorr commented Feb 7, 2019

+1

@tonygentilcore
Copy link

I got this error while using a Modal and the solution at #246 (comment) fixed it for me.

@Surangaup
Copy link

I got this error while using a Modal and the solution at #246 (comment) fixed it for me.

Thanks. Error with modal for me.

@jafar-jabr
Copy link

the issue still unresolved for 4 Years :))

@Muhammad-AhmadRafique
Copy link

yes, I am facing the same issue.
Can anyone help me to resolve this?

I have updated all of my Modals like below:

<Modal
        visible={true}
        supportedOrientations={['portrait', 'landscape']}
      >
      </Modal> 

please, any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests