upgrade-support
upgrade-support copied to clipboard
Could not load NIB in bundle: 'LaunchScreen' - Upgrade 0.61.5 to 0.63.3
Environment
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
Memory: 153.91 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 23.0.1, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1, 28.0.3, 29.0.2
System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_181 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: ^16.13.1 => 16.13.1
react-native: ^0.63.3 => 0.63.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Upgrading version
0.63.3
Description
After upgrading RN from 0.61.5
to 0.63.3
, my app seems to be crashing immediately on launch with error message:
Thread 1: "Could not load NIB in bundle: 'NSBundle </Users/Rezinka/Library/Developer/CoreSimulator/Devices/879DF873-0AC0-4846-87C1-132A14D17A09/data/Containers/Bundle/Application/1466901C-CC86-45A2-9D30-6902FB61B4A7/FridayApp.app> (loaded)' with name 'LaunchScreen'"
Followed the upgrade instructions from here: https://github.com/react-native-community/upgrade-support/issues/13
Any help / ideas is much appreciated.
XCode: 12.0.1, Node: 12.18.4
Closing this. Got it working by adding LaunchScreen.storyboard
to Copy Bundle Resources
EDIT (May 2021): Need to remove LaunchScreen.xib
and add LaunchScreen.storyboard
as referenced here. Then add the reference to your project.
Sorry for replying to a closed issue,
I have the same issue however adding LaunchScreen.storyboard
to Copy Bundle Resources did not fix the issue (it was added prior) , is there anything else you did?
Hi @vincent1114 , can you try removing the reference and adding again. Sometimes the existing reference gets corrupted.
Hi, @evryone. I remove it and add again but it seems not to work any idea for this issue?
That's what solved for me. re-opening this issue for better reach.
@AmitM30 Thanks for the suggestion and reopening, I tried and didn't work either.
For reference, I upgraded from 0.61.5
to 0.64.1
, did #13, added a couple of lines to podfile to fix xcode 12.5 issue discussed here: https://github.com/facebook/react-native/issues/28405#issuecomment-840914650.
In my upgrade (from 0.61.5
to 0.63.3
), I have this change:
ios/FridayApp/Base.lproj/LaunchScreen.xib
-> removed
ios/FridayApp/LaunchScreen.storyboard
-> added
I was following the official upgrade guide from here.
For me. I have just resolved it. Just change to another device or simulator. It took me some hours. I think it has a cache for the old device by switch another branch and when you reinstall the project by yarn or npm it makes a cache. Just clear the project and change to another simulator. It works fine for me. But I think it only correct for some cases. Pls try, hope to help you!
Added: My code works well before having this bug, Not for init the lib.
Looks like I have different issues than you guys, I tried changing simulator and resetting still no good. Thanks for the input
Hi recently migrated to RN 0.65.1 and after re-implementing RN splash-screen and using LaunchScreen.storyboard I also encountered this issue
Basically was ready to give up and move on to other tasks so I commented out both options
// [RNSplashScreen show];
// [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView];
as I had been testing both.
Guess what?
Build works and app doesn't crash AND I'm still seeing the splash screen
@markl-vesper I had the same experience.
Hi recently migrated to RN 0.65.1 and after re-implementing RN splash-screen and using LaunchScreen.storyboard I also encountered this issue
Basically was ready to give up and move on to other tasks so I commented out both options
// [RNSplashScreen show]; // [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView];
as I had been testing both.
Guess what?
Build works and app doesn't crash AND I'm still seeing the splash screen
@markl-vesper that code is in place to show the splash screen in between when the launch screen initially shows and when the app first appears. without it, there is a blank screen for a short period of time.

I was able to resolve it this by choosing "LaunchScreen.storyboard" from main Interface.
In TARGETS, Select General Tab and under Deployment info, select LaunchScreen.storyboard as Main Interface. Now Clean build folder and rebuild .
This solved my issue.