Force update
useGetDeviceAppVersion
How to use it?
Import
useGetDeviceAppVersion:
import {useGetDeviceAppVersion} from 'LinkerStudio/core/hooks';Add this code block:
const [updateRequired] = useGetDeviceAppVersion();Import
ForceUpdateStackNavigator
import ForceUpdateStackNavigator from 'src/navigation/ForceUpdateStackNavigator';In your
<NavigationContainer></NavigationContainer>add the next code block
<NavigationContainer >
{updateRequired ? <ForceUpdateStackNavigator /> : /* Other stack */}
</NavigationContainer>How to get force update?
Import the
deviceInfoservices:
import deviceInfo from 'LinkerStudio/core/services/forceUpdateServices';Import
Platformto get the platform the app is running on (Android or iOS).
import {Platform} from 'react-native';Last updated
Was this helpful?