react-nativereact-native-firebasereact-native-splash-screen

How to use `react-native-splash-screen` or `react-native-bootsplash` with `react-native-firebase/messaging`?


I was using react-native-splash-screen it worked fine but after adding react-native-firebase/messaging I found issues with it and found I should be using react-native-bootsplash. I installed it and one of the steps included changing the compileSdkVersion and targetSdkVersion to 31. I recompiled my code and it somehow broke firebase messaging. I am confused about what to use and how to actually use it without breaking anything in the process. Any help will be really appreciated.


Solution

  • I had faced similar issues - react-native-splash-screen is not well-maintained and I'd not recommend using it. I use react-native-bootsplash instead, it is also easier to set up and is being actively maintained. I don't have any experience with the latest versions (>=4.x) but 3.2.x worked just fine.

    Edit: I can now report, that v4.0.1 works well for ios. However, there are still some problems with some android phones:

    Since this library uses the latest Android12-SplashScreen-API, not all android phones support it. Xaomi's Android versions for example don't support it yet, which means that the splash screen is not displayed correctly. Other than that, there aren't any problems.

    Keep in mind, that v4.x.x will require sdk-level 31 (Android12), which means, that you might have to upgrade/patch some of your other 3rd party packages to make them compatible.