I use RNN as the following:
Navigation.setDefaultOptions({
modalPresentationStyle: "pageSheet",
layout: {
componentBackgroundColor: "#e8e8e8",
orientation: ["landscape"]
},
topBar: {
visible: false,
height: 0
},
animations: {
setRoot: {
alpha: {
from: 0,
to: 1,
duration: 500
}
}
}
});
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: screenName,
passProps
}
}
]
}
}
});
And push/pop/showOverlay all work well, but showModal works well on android and not work on iOS.
Nothing happens when execute the following code:
Navigation.showModal({
component: {
name: screenName,
passProps
}
});
I debug the native code, and find the topVC is nil.

When I add [ UIApplication.sharedApplication.delegate setWindow:_mainWindow];
But i am not sure it is right.

Could anyone give me a better solution?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
I confirm that 's the bug still exist !
showModal doesn't work on 3.1.1
In my project there were two lines of code that we added in order to prevent a white flash during a screen push with the V1. We removed them and now showModal works everywhere.
In AppDelegate.m remove these, if present:
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
In general: if you added something in AppDelegate with the V1 then try to remove it. Shoutout to @FRizzonelli that is the true hero of this long-term problem.
@FRizzonelli, You saved my all day!!!
@FRizzonelli, You saved my all day!!!
It was a pleasure to be useful :)
Most helpful comment
In my project there were two lines of code that we added in order to prevent a white flash during a screen push with the V1. We removed them and now
showModalworks everywhere.In
AppDelegate.mremove these, if present:In general: if you added something in
AppDelegatewith the V1 then try to remove it. Shoutout to @FRizzonelli that is the true hero of this long-term problem.