Skip to content

Commit

Permalink
fix: use splash screen config plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Dec 30, 2024
1 parent d049750 commit 2dd4882
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
13 changes: 8 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#0B0930"
},
"newArchEnabled": true,
"assetBundlePatterns": ["**/*"],
"plugins": [
[
"expo-splash-screen",
{
"backgroundColor": "#0B0930",
"image": "./assets/icon.png",
"imageWidth": "150"
}
],
[
"expo-local-authentication",
{
Expand Down
5 changes: 3 additions & 2 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
} from "@react-navigation/native";
import { PortalHost } from "@rn-primitives/portal";
import * as Font from "expo-font";
import { Slot, SplashScreen } from "expo-router";
import { Slot } from "expo-router";
import * as SplashScreen from "expo-splash-screen";
import { StatusBar } from "expo-status-bar";
import { swrConfiguration } from "lib/swr";
import * as React from "react";
Expand Down Expand Up @@ -80,7 +81,7 @@ export default function RootLayout() {
await Promise.all([loadTheme(), loadFonts(), checkBiometricStatus()]);
} finally {
setResourcesLoaded(true);
SplashScreen.hideAsync();
SplashScreen.hide();
}
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"expo-local-authentication": "~15.0.1",
"expo-router": "~4.0.11",
"expo-secure-store": "~14.0.0",
"expo-splash-screen": "^0.29.18",
"expo-status-bar": "~2.0.0",
"lottie-react-native": "7.1.0",
"message-port-polyfill": "^0.2.0",
Expand Down
29 changes: 29 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,23 @@
semver "^7.6.0"
xml2js "0.6.0"

"@expo/prebuild-config@^8.0.23":
version "8.0.23"
resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.0.23.tgz#2ec6d5464f35d308bdb94ba75b7e6aba0ebb507d"
integrity sha512-Zf01kFiN2PISmLb0DhIAJh76v3J2oYUKSjiAtGZLOH0HUz59by/qdyU4mGHWdeyRdCCrLUA21Rct2MBykvRMsg==
dependencies:
"@expo/config" "~10.0.4"
"@expo/config-plugins" "~9.0.10"
"@expo/config-types" "^52.0.0"
"@expo/image-utils" "^0.6.0"
"@expo/json-file" "^9.0.0"
"@react-native/normalize-colors" "0.76.5"
debug "^4.3.1"
fs-extra "^9.0.0"
resolve-from "^5.0.0"
semver "^7.6.0"
xml2js "0.6.0"

"@expo/rudder-sdk-node@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@expo/rudder-sdk-node/-/rudder-sdk-node-1.1.1.tgz#6aa575f346833eb6290282118766d4919c808c6a"
Expand Down Expand Up @@ -1947,6 +1964,11 @@
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.3.tgz#8d4de4a8671385c53b2d202ef0137632abcf747d"
integrity sha512-Yrpmrh4IDEupUUM/dqVxhAN8QW1VEUR3Qrk2lzJC1jB2s46hDe0hrMP2vs12YJqlzshteOthjwXQlY0TgIzgbg==

"@react-native/[email protected]":
version "0.76.5"
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.5.tgz#a33560736311aefcf1d3cb594597befe81a9a53c"
integrity sha512-6QRLEok1r55gLqj+94mEWUENuU5A6wsr2OoXpyq/CgQ7THWowbHtru/kRGRr6o3AQXrVnZheR60JNgFcpNYIug==

"@react-native/[email protected]":
version "0.76.3"
resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.76.3.tgz#9865f9e3770c101476564dc2436018f82adfb4b3"
Expand Down Expand Up @@ -4568,6 +4590,13 @@ expo-secure-store@~14.0.0:
resolved "https://registry.yarnpkg.com/expo-secure-store/-/expo-secure-store-14.0.0.tgz#cf6eb7f73e619f8907d5a073e2f438927b5fc2ab"
integrity sha512-VyhtRFXP+7hQmHhKlHIOWid1Q/IRpM7Uif32tZHLZHvQ6FNz2cUkr26XWGvCa7btYbrR6OL++FBFZYjbIcRZTw==

expo-splash-screen@^0.29.18:
version "0.29.18"
resolved "https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.29.18.tgz#96ccce3d5a03389a9061743903b0a77c22a16796"
integrity sha512-bTBY+LF6YtYen2j60yGNh2SX/tG4UXZAyBCMMriOSiZZ7LSCs3ARyEufaSiWk+ckWShTeMqItOnaAN/CAF8MJA==
dependencies:
"@expo/prebuild-config" "^8.0.23"

expo-status-bar@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-2.0.0.tgz#dd99adc2ace12a24c92718cd0f97b93347103393"
Expand Down

0 comments on commit 2dd4882

Please sign in to comment.