Skip to content

Commit

Permalink
Fix splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 18, 2024
1 parent 61cf53f commit bb027d2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 68 deletions.
4 changes: 1 addition & 3 deletions mobile/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ Notifications.setNotificationHandler({
})

//
// Prevent native splash screen from autohiding before App component declaration
// Keep the splash screen visible while we fetch resources
//
SplashScreen.preventAutoHideAsync()
.then((result) => console.log(`SplashScreen.preventAutoHideAsync() succeeded: ${result}`))
.catch(console.warn) // it's good to explicitly catch and inspect any error

const App = () => {
const [appIsReady, setAppIsReady] = useState(false)
Expand Down
42 changes: 21 additions & 21 deletions mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
"assetBundlePatterns": [
"**/*"
],
"splash": {
"backgroundColor": "#f37022",
"image": "./assets/splash.png"
},
// "splash": {
// "backgroundColor": "#f37022",
// "image": "./assets/splash.png"
// },
"android": {
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png"
},
"icon": "./assets/icon.png",
"splash": {
"backgroundColor": "#f37022",
"image": "./assets/splash.png"
},
// "splash": {
// "backgroundColor": "#f37022",
// "image": "./assets/splash.png"
// },
"googleServicesFile": "./google-services.json",
"softwareKeyboardLayoutMode": "pan",
"package": "com.bookcars"
Expand All @@ -31,24 +31,24 @@
"buildNumber": "4.6.0",
"supportsTablet": true,
"icon": "./assets/icon.png",
"splash": {
"backgroundColor": "#f37022",
"image": "./assets/splash.png",
"tabletImage": "./assets/splash-tablet.png"
},
// "splash": {
// "backgroundColor": "#f37022",
// "image": "./assets/splash.png",
// "tabletImage": "./assets/splash-tablet.png"
// },
"bundleIdentifier": "com.bookcars"
},
"plugins": [
"expo-localization",
"./plugins/usesCleartextTraffic",
// [
// "expo-splash-screen",
// {
// "backgroundColor": "#f37022",
// "image": "./assets/splash.png",
// "imageWidth": 200
// }
// ],
[
"expo-splash-screen",
{
"backgroundColor": "#f37022",
"image": "./assets/icon.png",
"imageWidth": 200
}
],
[
"@stripe/stripe-react-native",
{
Expand Down
76 changes: 38 additions & 38 deletions mobile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"dependencies": {
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.2.0",
"@react-navigation/drawer": "^7.0.3",
"@react-navigation/native": "^7.0.2",
"@react-navigation/native-stack": "^7.0.2",
"@react-navigation/stack": "^7.0.2",
"@react-navigation/drawer": "^7.0.4",
"@react-navigation/native": "^7.0.3",
"@react-navigation/native-stack": "^7.0.3",
"@react-navigation/stack": "^7.0.3",
"@stripe/stripe-react-native": "0.38.6",
"@types/lodash.debounce": "^4.0.9",
"@types/mime": "^4.0.0",
Expand All @@ -45,7 +45,7 @@
"expo-localization": "~16.0.0",
"expo-location": "~18.0.1",
"expo-notifications": "~0.29.8",
"expo-splash-screen": "~0.29.10",
"expo-splash-screen": "~0.29.11",
"expo-status-bar": "~2.0.0",
"expo-updates": "~0.26.7",
"i18n-js": "^4.5.0",
Expand All @@ -62,7 +62,7 @@
"react-native-paper": "^5.12.5",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.0.0",
"react-native-screens": "~4.1.0",
"react-native-size-matters": "^0.4.2",
"react-native-toast-message": "^2.2.1",
"react-native-vector-icons": "^10.2.0",
Expand Down

0 comments on commit bb027d2

Please sign in to comment.