-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v6 - Expo plugin, simpler setup #578
Conversation
c67e00d
to
0d9d2d0
Compare
There's no need to run |
Hello I tried using v6 on my expo project and found a bug. |
I'm aware, as expo does not properly support I'm waiting for their fix (it also require a react native update) |
@exploitJ The PR has been accepted, the fix should land soon: facebook/react-native#44775 |
Hello, |
@Mirthis Are you running the latest beta? Should be |
@zoontek thanks for the quick response. As mentioned above If I don't remove |
@Mirthis Would you be able to test with Expo 51? Or to publish a repository with a reproduction (Expo 50). |
@zoontek: From an initial test it looks like it works fine with expo 51. I need to spend some more time on this, I'll let you know if I find out something useful. |
@Mirthis I will have to set a requirement for Expo 51 anyway, as the |
Fyi I've just released 0.74.3 @zoontek |
@fazomo First one is an error with the I highly recommend NOT TO generate the assets in the CI, tho. Generate them on your computer and commit them. |
@zoontek thanks for this amazing PR. I'm trying it (6.0.0-beta.9) with Expo 51.0.20 and it's working perfectly with local prebuild. However, while trying to build the app through EAS I'm getting the same error mentioned by @fazomo. ![]() |
@enzomanuelmangano Did you set the |
@zoontek I'm using this config in the app.config.ts, copied from React Conf App 😅. I added the "assetsDir" although I think it's the default but unfortunately the issue is still there. What doesn't make sense to me is that locally the prebuild works perfectly and only fails while creating the build with EAS. [
"react-native-bootsplash",
{
assetsDir: "assets/bootsplash",
android: {
parentTheme: "TransparentStatus",
darkContentBarsStyle: false
}
}
] ![]() |
@enzomanuelmangano I think there's an issue with workingPath in CI |
@fazomo @enzomanuelmangano Could you try latest beta (10)? The expo plugin now stop using I also set a requirement for Expo |
Sorry for my late reply. I've just checked again and it worked perfectly! Thanks a lot for your work 🙌 |
@enzomanuelmangano And thanks for your sponsorship, it means a lot 🙏 |
Hi folks! 👋
This PR has been opened to track the development of the next major version: v6 ✨
Note that the React Conf app, that uses expo, is already using this beta (with
useHideAnimation
)!Check this beauty 👀 :
react.conf.app.splash.screen.mp4
What's new
Expo plugin 🧩
In order to fix the duplicate splash screens issue on Android 12+ and beneficiate from this library animation capabilities, expo users can now uses
react-native-bootsplash
as a replacement forexpo-splash-screen
.The bootsplash CLI is still in charge of the heavy stuff (images generation, license check if required…), but will now outputs all files in
assets/bootsplash
instead, when it detects that the project uses expo.The expo plugin edits the android / ios config files (
AndroidManifest.xml
,MainActivity.{java,kt}
,styles.xml
,colors.xml
,AppDelegate.m
,Info.plist
,YourApp.xcodeproj
…) on prebuild and copy the generated assets in the correct directories.Simpler setup ✨
In bare react-native projects, the generator is now able to edit your
AndroidManifest.xml
andstyles.xml
, removing those two steps from the setup process.Other changes
Theme.BootSplash.TransparentStatus
. It's an easier way to have a transparent status bar on android (with an opaque navigation bar)ready
option has been added touseHideAnimation
in order to delay your animation, if you want to wait for something else than just layout rendering + images loading.--assets-output
now has a default value, which isassets/bootsplash
and will always be generated, as it's required for expo or theuseHideAnimation
hook (assets/bootsplash_logo.png
becomeassets/bootsplash/logo.png
, etc.)--html
default is nowpublic/index.html
.colorset
for background color, even if you choose not to support dark mode (before it was inlined in the.storyboard
file in such case).How to try it
Install the
@next
version:$ npm install --save react-native-bootsplash@next # --- or --- $ yarn add react-native-bootsplash@next
With expo
expo-splash-screen
autolinking (in yourpackage.json
):app.json
:📌 The available plugins options are:
$ npx react-native generate-bootsplash … # --- or --- $ yarn react-native generate-bootsplash …
What's next?
MIGRATION.md
guide.expo-updates
. As theRCTRootView
instance is recreated during app launch, a quick flicker is unfortunately visible. We are working with the expo team to fix this.splash
property fromapp.json
will be enough to unlinkexpo-splash-screen
, without any additional config in yourpackage.json
. The expo team is working on this.Note
Don't forget that the CLI requires a license key for advanced options such as brand image or dark mode.
👉 You can buy it on Gumroad and uses the
REACTCONF2024
discount code for -50% (expires the 1st of June).You can also see this as a good way to support my work in the react native community, keep my motivation up, and keep this library alive and well-maintained. 🙌