Closed rersozlu closed 1 month ago
@rersozlu Hi, a few things / questions:
hide
called? Is it in AnimatedSplashScreen
? Or maybe are you using useHideAnimation
? Could you provide this file?hide
/ to mount AnimatedSplashScreen
. Does the native splash screen is hiding? Or does it stay?BootSplash.storyboard
?UILaunchStoryboardName
in your Info.plist
?hi @zoontek ! thanks a lot for your swift response, really appreciate it.
Updating library to 5.5.3 and modifying AppDelegate accordingly (not-bridgeless)
[UIKitCore] Unsupported enumeration of UIWindowScene windows on non-main thread.
useHideAnimation is called inside AnimatedSplashScreen
import { type $MixedElement } from '@getclave/ui/src/types';
import { useRef } from 'react';
import { Animated } from 'react-native';
import BootSplash from 'react-native-bootsplash';
type Props = {
onAnimationEnd: () => void;
};
export const AnimatedSplashScreen = ({
onAnimationEnd,
}: Props): $MixedElement => {
const size = useRef(new Animated.Value(1)).current;
const duration = 2300;
const { container, logo /*, brand */ } = BootSplash.useHideAnimation({
// eslint-disable-next-line
manifest: require('../assets/bootsplash_manifest.json'),
// eslint-disable-next-line
logo: require('../assets/bootsplash_logo.png'),
statusBarTranslucent: true,
navigationBarTranslucent: false,
animate: () => {
Animated.parallel(
[
Animated.timing(size, {
useNativeDriver: true,
toValue: 1.5,
duration: 300,
delay: duration,
}),
],
{ stopTogether: false },
).start(() => onAnimationEnd());
},
});
return (
<Animated.View {...container} style={[container.style]}>
<Animated.Image
{...logo}
style={[logo.style]}
// style={[logo.style, { transform: [{ scale: size }] }]}
/>
</Animated.View>
);
};
Removed AnimatedSplashScreen and native splash screen disappears after a white blink again, but earlier than expected. I think problem is happening here somehow
yes its named BootSplash.storyboard
Removed AnimatedSplashScreen and native splash screen disappears after a white blink again, but earlier than expected. I think problem is happening here somehow
Indeed, if it's hiding without calling hide
explicitely, there's something wrong here. Just in case, are you using Expo?
@zoontek , no but started project with Expo, then ejected so it is bare workflow atm. I can add you to repo btw
@rersozlu Sure, you can invite me
+1 having a similar flicker after upgrading to lastest versions. Adding a bit of delay to the hide fixed it.
@rersozlu Never invited me, I'm closing this.
@ImBeCiliC It might be related to react-navigation
calling onReady
too soon. I saw that previously. When waiting for onLayout
, there's no issue (useHideAnimation
does that for you)
Before submitting a new issue
Bug summary
Hi there! I've implemented this library to our project and set it up according to the README file of 5.4.1 and published the app successfully. But there is a white blink happening at launch regardless of fixes I tried. Sharing the video and AppDelegate below, also App.tsx to give insight about hide function.
https://github.com/user-attachments/assets/4d679f14-e0c8-4612-8e51-ea8a2cda9229
Library version
5.4.1
Environment info
Steps to reproduce
Reproducible sample code