Please provide the following:
- SDK Version:49
- Platforms(Android/iOS/web/all): android
- Add the appropriate “Tag” based on what Expo library you have a question on.
hello
my app wont render the image that i set on the splash screen setting, only in production! at the development is render the image on the production its only show white screen.
before 3 months the app was render the image on production but not it show only white screen
import * as SplashScreen from "expo-splash-screen";
import { useState, useEffect, useMemo } from "react";
import { Provider } from "react-redux";
import store from "./store/Index";
import { LogBox } from "react-native";
import axios from "axios";
import DataProvider from "./context/Data";
import AppContainer from "./AppContainer";
import "./language/Data";
LogBox.ignoreLogs([" Invalid prop `textStyle` of type `array` supplied to `Cell`, expected `object`"]);
SplashScreen.preventAutoHideAsync();
export default function App() {
const [appIsReady, setAppIsReady] = useState(false);
useEffect(() => {
async function prepare() {
try {
if (process.env.NODE_ENV === "production") {
axios.get(`${process.env.EXPO_PUBLIC_HEROKU_URL}/latest-lottery`);
}
await new Promise((resolve) => setTimeout(resolve, 1500));
} catch (e) {
console.warn(e);
} finally {
setAppIsReady(true);
}
}
prepare();
}, []);
const onLayoutRootView = useMemo(async () => {
if (appIsReady) {
await SplashScreen.hideAsync();
}
}, [appIsReady]);
if (!appIsReady) {
return null;
}
return (
<Provider store={store}>
<DataProvider>
<AppContainer />
</DataProvider>
</Provider>
);
}
{
"expo": {
"name": "lottery",
"runtimeVersion": {
"policy": "sdkVersion"
},
"plugins": [
[
"expo-build-properties",
{
"android": {
"enableProguardInReleaseBuilds": true
}
}
],
[
"expo-image-picker",
{
"photosPermission": "The app accesses your photos to let you share them with your friends."
}
]
],
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/292e68aa-3480-4c01-b697-6672a8d899fc"
},
"slug": "lottery",
"version": "1.0.19",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/lotto-background.png"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.liors.lottery.first.project",
"versionCode": 20,
"adaptiveIcon": {
"foregroundImage": "./assets/lotto-background.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "292e68aa-3480-4c01-b697-6672a8d899fc"
}
}
}
}