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

Modal crash in iOS app extension #13951

Closed
npomfret opened this issue May 12, 2017 · 5 comments
Closed

Modal crash in iOS app extension #13951

npomfret opened this issue May 12, 2017 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@npomfret
Copy link
Contributor

I'm seeing my app extension crash on some devices. It launches a Modal which appears briefly before the whole thing vanishes. I can't see an explicit error message but I have noticed the message below (which I don't understand). Any ideas?

2017-05-12 21:01:55.731 [error][tid:main][RCTModalHostViewController.m:68] Modal was presented with 0x2 orientations mask but the application only supports 0x0.Add more interface orientations to your app's Info.plist to fix this.NOTE: This will crash in non-dev mode.
2017-05-12 21:01:55.730695+0100 myapp-share[18726:4276060] Modal was presented with 0x2 orientations mask but the application only supports 0x0.Add more interface orientations to your app's Info.plist to fix this.NOTE: This will crash in non-dev mode.
@Kureev
Copy link
Contributor

Kureev commented May 14, 2017

I don't know what exactly goes wrong, but after reading this stack trace I have a feeling that your extension requires an unsupported orientation. Could it be so? (Like you disabled landscape orientation, but your extension requires it?)

@npomfret
Copy link
Contributor Author

That's what I thought, but I have all orientations ticked in the deployment info bit of my app (there's no option in the app extension for this). However, I removed the modal code from my Rn app extension and the it still crashed. So either it's a misleading error message or I have 2 bugs. Either way I'll close for now.

@Kureev
Copy link
Contributor

Kureev commented May 15, 2017

If at some point you'll sort it out, please, document your findings somewhere 🙏 (mb here?) It may be extremely helpful for others!

@johnlim5847
Copy link

not sure it will help or not i think you should add this props supportedOrientations={['portrait', 'landscape']} in your Modal

@lnikkila
Copy link
Contributor

We’re seeing a similar error message in an iMessage extension that uses React Native. It doesn’t seem to crash in production despite what the error message says.

The message comes from RCTModalHostViewController which checks the supported orientations from RCTSharedApplication’s window. RCTUtils returns nil from RCTSharedApplication when React Native is running in an app extension, which translates to 0x0 as the returned supported orientations mask.

I think the modal orientation check is misleading when running in an app extension and should probably be skipped.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants