rishabhbhatia / react-native-awesome-alerts

Awesome alerts for React Native, works with iOS and Android.
MIT License
525 stars 71 forks source link

[iOS] crash #73

Closed franj0 closed 4 years ago

franj0 commented 4 years ago

My app is landscape only and everything works fine until this moment.

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.

Maybe it's due iOS 14 update but I can't find solution for this. Native modal works fine.

this is issue only on iOS

franj0 commented 4 years ago

EDIT: Can you add prop to Modal component at AwesomeAlert.js line 202 supportedOrientations={["landscape"]}

return showSelf ?
      wrapInModal ? (
        <Modal supportedOrientations={["landscape"]}
          animationType="none"
          transparent={true}
          visible={show}
          onRequestClose={() => {
            if (showSelf && closeOnHardwareBackPress) {
              this._springHide();
            }
          }}
        >
          {this._renderAlert()}
        </Modal>
      ) : this._renderAlert()
    : null;
rishabhbhatia commented 4 years ago

@franj0 Sure, I'll add support for Modal props sometime this weekend and release a new version.

rishabhbhatia commented 4 years ago

@franj0 Modal props support is added in new v1.4.2. You can now pass modalProps to AwesomeAlert.

<AwesomeAlert
   modalProps={{
     supportedOrientations: ['portrait', 'landscape'],
     animationType: 'slide',
   }}
/>