Closed MoOx closed 4 years ago
Also if this fail, maybe do an explicit crash instead of just logging the stack trace? (Loggin is nice, but being stuck on the splash screen is probably more frustrating)
@MoOx Totally agree that it should crash if the Activity is not found.
I will ship that feature and bump the package to v1.0.0 as it seems stable enough for everyone.
Switching to another library as this doesn't work on Android nor on iOS
It works like a charm. You probably didn't set this up correctly. If you share your setup we might be able to help you.
I followed everything mentioned on the docs, iOS build succeeds but I'm still seeing the RN splash screen (I'm using react-navigation) As for Android, the build fails, getting this same issue, I tried the workaround mentioned above but the issue still exists
If you share more details we won't be able to help.
For iOS
Can you show the snippet where [RNBootSplash show:@"LaunchScreen" inView:rootView];
is placed?
For Android
Please share the complete error
hi @MoOx , i have created a pr to fix this issue but with different approach , hope it helps, https://github.com/zoontek/react-native-bootsplash/pull/16
Not sure that your fix will help with my edge case but it looks good anyway!
@MoOx The new version (3.0.0) no longer require a SplashScreenActivity.java
! Please give it a try: https://github.com/zoontek/react-native-bootsplash/tree/3.0.0 🙂
💻 My environment
🕵️♂️ Reproducing the issue
If your code isn't located at the place expected by this assumption https://github.com/zoontek/react-native-bootsplash/blob/60f7e216d626264e72f5efdad97672162324de7f/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashActivity.java#L15-L16 (
getApplicationContext().getPackageName()
)(My case: white labeled app with dynamic application id that's doesn't match the classes path)
🤞Solution
Your solution after a private discussion:
https://developer.android.com/guide/topics/manifest/meta-data-element
Workaround
Use your own class for the activity. Eg for me with android-pre x