When setting modalPresentationStyle to popover the application crashes when opening a modal.
xCode reports following:
* Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (
Following is directly from playground ModalScreen.js with the options modalPresentationStyle set to popover
showModal = () => {
Navigation.showModal({
component: {
name: Screens.Modal,
passProps: {
modalPosition: this.getModalPosition() + 1,
previousModalIds: concat([], this.props.previousModalIds || [], this.props.componentId)
},
options: {
modalPresentationStyle: 'popover'
}
}
});
}
Hi @WillemPCIO I couldn't reproduce this on the latest Playground app. Would you be able to provide a minimal reproduction so that I can better understand what's going on? Cheers!
Hi @jinshin1013,
These are the exact steps I'm following to reproduce:
The expectation is that a popover is shown. Above approach works fine on Android however crashes on iOS and we are not sure if we are missing something in setting up the popover specifically for iOS or whether this is an actual issue. Within playground app, productive apps being upgraded to RNN V6, barebones vanilla app any showModal with modalPresentationStyle:'popover' crashes hence we don't think this is a repo related thing but rather:
Hope this helps.
Hi @WillemPCIO, thanks for providing detailed steps to reproduce the issue. I've followed your instruction but could not reproduce the same error you are seeing, see the code/clip below:
showModal = () => {
Navigation.showModal({
component: {
name: Screens.Modal,
passProps: {
modalPosition: this.getModalPosition() + 1,
previousModalIds: concat([], this.props.previousModalIds || [], this.props.componentId),
},
options: {
modalPresentationStyle: 'popover',
},
},
});
};

It'd be helpful if you could provide a minimal reproduction on Github.
I could reproduce following the @WillemPCIO steps, the bug only appears on iPad (no iPhone).
@jinshin1013 your code is correct, that crash, just test it on iPad.

@RodolfoGS, Yes, that is correct it is on iPad that we are seeing this. Thanks for the repro and gif :) Much appreciated.
@jinshin1013 - sorry I've been swamped and haven't been able to put up a minimal reproduction. As per Rodolfo's comment - this appears to only happen on iPad and the code you had initially should reproduce on an iPad.
Hey guys, sorry for the delayed response 😓. Really appreciate the clip demonstrating the problem. I'll add this to the backlog!
same issue, please fix it. thanks