My app running very good on IPhone but can't show app content and show black screen only on IPad with universal mode.
await Navigation.events().registerAppLaunchedListener(async () => { Promise.resolve(); });
await Navigation.setDefaultOptions({
layout: { backgroundColor: '#f2f1f1' },
statusBar: {
style: 'light'
},
topBar: {
height: px(170),
noBorder: false,
buttonColor: '#ffffff',
background: { color: '#4c77e0' },
backButton: { color: '#ffffff' },
title: {color: '#ffffff'}
}
});
await Navigation.setRoot({
root: {
stack: {
children: [
{ component: { name: 'app.Home' } }
]
}
}
});
Device info (Simulator/Device? OS version? Debug/Release?):
IPad
I have the same problem
I have the same problem
I'm seeing the same issue when changing the target to iPad exclusively, not just when doing a universal deployment.
I confirmed that this is still happening on the latest version (2.11 at this point)
I'm seeing the same issue when changing the target to iPad exclusively, not just when doing a universal deployment.
I confirmed that this is still happening on the latest version (2.11 at this point)
For now I'm using version 2.0.5555 that works on the Ipad
@fredericogg thank you! That does work (version 2.0.2555). I haven't yet determined what is the most _recent_ version that works, but that one does indeed get past the black screen issue.
Side note: I'm fairly surprised this hasn't been reported more. Are folks not doing iPad apps with this nav library? Or are they just not hitting this particular issue somehow?
After doing some further testing on older point releases, it looks like version 2.02570 is the last working version that doesn't have this black screen issue on iPad. 2.02571 is where it begins to be a problem.
Narrowed down the issue a bit more and also found a workaround. Essentially, if you have changed the splash/launch screen settings so that there is no LaunchScreen.xib file such as this image it will show a black screen:
You can workaround this by specifying a launchscreen nib file. In my case, I typically use generator-rn-toolbox to setup my splash screens and app icons. This utility also changes the launch screen nib file usage. So, there's a bit of work to make the launch screen nib file be what you want it to be, but it gets past the black screen issue, which is my priority at this point.
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.
same issue for me on ipad
same issue for me on ipad
universal build
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.
it's still happening
any update on this?
I came across this issue as well, i didn't realize it's caused by using an image asset for the the launch screen. But I did do a little sleuthing in the x-code debugger
In your Xcode project navigate to RNNCommandsHandler.m
around line 80 you will find this line
_mainWindow.rootViewController = vc
directly below add this
[UIApplication sharedApplication].windows.firstObject.hidden=NO;
You'll now see your root view controller on an iPad when using an image asset launch screen.
Im sure there is a much better solution to be implemented but for me this is working.
@nic-thomson suggested change did not work for me, i am using Admob library also.
You’ll need to recompile the binary via Xcode or terminal as well ( maybe obvious)
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.
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.
it's still happening
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.
is not fixed
I've just hit into this *$$€ issue... Does anybody have a workaround other than using a nib launch screen instead ?
@zabojad Try my solution mentioned here https://github.com/wix/react-native-navigation/issues/4580#issuecomment-482669978.I had reimplement it this morning after upgrading RNN to the latest version. It still works for me.
Thanks @nic-thomson ! I'm gonna try this tonight.
@nic-thomson I do not understand why but the issue disappeared without applying your fix (or any other fix). The only thing I've changed is that I've added some missing images in the images.xcassets/LaunchImage because I did not have all images resolutions yet. Now that they are all provided, it seems that the black screen does not shows up anymore.
That's very good news. But out of curiosity, would you have any idea why this seems to have solved the issue?
My launchImage is missing few files (
@nic-thomson I do not understand why but the issue disappeared without applying your fix (or any other fix). The only thing I've changed is that I've added some missing images in the images.xcassets/LaunchImage because I did not have all images resolutions yet. Now that they are all provided, it seems that the black screen does not shows up anymore.
That's very good news. But out of curiosity, would you have any idea why this seems to have solved the issue?
This worked for me
@nic-thomson [UIApplication sharedApplication].windows.firstObject.hidden=NO;
adding this line in RNNCommandsHandler.m worked for me
On iPad running iOS 13.2.3 still happening.
@nic-thomson's answer worked too - this should really be better documented (fixed really), took me hours to figure it out. Still happening on RNN 4.5.0 on latest iPad version
I came across this issue as well, i didn't realize it's caused by using an image asset for the the launch screen. But I did do a little sleuthing in the x-code debugger
In your Xcode project navigate to RNNCommandsHandler.m
around line 80 you will find this line
_mainWindow.rootViewController = vc
directly below add this
[UIApplication sharedApplication].windows.firstObject.hidden=NO;
You'll now see your root view controller on an iPad when using an image asset launch screen.
Im sure there is a much better solution to be implemented but for me this is working.
Using this method causes other problems, such as Dimensions.get('window').width
being 0 and Show Inspector
not working; the best way is to use LaunchScreen.storyboard
, which is also recommended by the App Store.
I came across this issue as well, i didn't realize it's caused by using an image asset for the the launch screen. But I did do a little sleuthing in the x-code debugger
In your Xcode project navigate to RNNCommandsHandler.m
around line 80 you will find this line
_mainWindow.rootViewController = vc
directly below add this
[UIApplication sharedApplication].windows.firstObject.hidden=NO;
You'll now see your root view controller on an iPad when using an image asset launch screen.
Im sure there is a much better solution to be implemented but for me this is working.Using this method causes other problems, such as
Dimensions.get('window').width
being 0 andShow Inspector
not working; the best way is to useLaunchScreen.storyboard
, which is also recommended by the App Store.
Problem still persist after using launchScreen.storyboard.
Most helpful comment
I came across this issue as well, i didn't realize it's caused by using an image asset for the the launch screen. But I did do a little sleuthing in the x-code debugger
In your Xcode project navigate to RNNCommandsHandler.m
around line 80 you will find this line
_mainWindow.rootViewController = vc
directly below add this
[UIApplication sharedApplication].windows.firstObject.hidden=NO;
You'll now see your root view controller on an iPad when using an image asset launch screen.
Im sure there is a much better solution to be implemented but for me this is working.