Im build eas build stand alone both ios and android open the app freezes Splash screen
with SDK 44
but eas build dev client not solution
function Splash screen with App.js
function AnimatedSplashScreen({ children, image }) {
const animation = React.useMemo(() => new Animated.Value(1), [])
const [isAppReady, setAppReady] = React.useState(false)
const [isSplashAnimationComplete, setAnimationComplete] = React.useState(false)
useEffect(() => {
if (isAppReady) {
Animated.timing(animation, {
toValue: 0,
duration: 500,
useNativeDriver: true,
}).start(() => setAnimationComplete(true))
}
}, [animation, isAppReady])
// eslint-disable-next-line react-hooks/exhaustive-deps
const onImageLoaded = React.useMemo(() => async () => {
try {
await SplashScreen.hideAsync()
// Load stuff
// console.log('Load stuff')
await Promise.all([])
} catch (e) {
console.log(e)
} finally {
setAppReady(true)
}
})
return (
<View style={{ flex: 1 }}>
{isAppReady && children}
{!isSplashAnimationComplete && (
<Animated.View
pointerEvents="none"
style={[
StyleSheet.absoluteFill,
{
backgroundColor: Constants.manifest.splash.backgroundColor,
opacity: animation,
},
]}
>
<Animated.Image
style={{
width: '100%',
height: '100%',
resizeMode: Constants.manifest.splash.resizeMode || 'contain',
transform: [
{
scale: animation,
},
],
}}
source={image}
onLoadEnd={Platform.OS === 'android' ? onImageLoaded() : onImageLoaded}
fadeDuration={0}
/>
</Animated.View>
)}
</View>
)
}
Thank you.