react-native-phone-number-input
react-native-phone-number-input copied to clipboard
Crash: Modal was presented with 0x2 orientations
I got this error
Modal was presented with 0x2 orientations mask but the application only supports 0x18. Add more interface orientations to your app's Info. plist to fix this. NOTE: This will crash in non-dev mode.
So, I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-phone-number-input/lib/index.js b/node_modules/react-native-phone-number-input/lib/index.js
index b89c388..ddd341e 100644
--- a/node_modules/react-native-phone-number-input/lib/index.js
+++ b/node_modules/react-native-phone-number-input/lib/index.js
@@ -194,6 +194,9 @@ export default class PhoneInput extends PureComponent {
renderFlagButton={this.renderFlagButton}
onClose={() => this.setState({ modalVisible: false })}
{...countryPickerProps}
+ modalProps={{
+ supportedOrientations: ["landscape", 'portrait'],
+ }}
/>
{code && layout === "second" && (
<Text
This issue body was partially generated by patch-package.