@@ -25,9 +25,9 @@ No native modules, no pod install, no config plugin. It is JavaScript.
2525## Quick start
2626
2727``` tsx
28- import { RipstopProvider } from ' @ripstop/react-native' ;
2928import AsyncStorage from ' @react-native-async-storage/async-storage' ;
30- import { asyncStorageAdapter } from ' @ripstop/react-native' ;
29+ import DeviceInfo from ' react-native-device-info' ;
30+ import { RipstopProvider , asyncStorageAdapter } from ' @ripstop/react-native' ;
3131
3232export default function App() {
3333 return (
@@ -45,6 +45,26 @@ export default function App() {
4545That's the whole integration. The provider renders your app until a decision
4646says otherwise, then shows the right wall.
4747
48+ ## Why you still pass ` appVersion `
49+
50+ The other Ripstop SDKs read the installed version themselves — Swift from
51+ ` CFBundleShortVersionString ` , Flutter from ` package_info_plus ` . React Native
52+ cannot. Nothing in the framework exposes the host app's version: ` Platform.OS `
53+ and ` Platform.Version ` describe the operating system, and
54+ ` Platform.constants.reactNativeVersion ` describes React Native. Reading the
55+ bundle means a native module, and this package has none — see the installation
56+ note above, which is a promise worth more than saving you one argument.
57+
58+ So pass it, from whichever of these you already have:
59+
60+ ``` tsx
61+ import DeviceInfo from ' react-native-device-info' ; // DeviceInfo.getVersion()
62+ import Constants from ' expo-constants' ; // Constants.expoConfig?.version
63+ ```
64+
65+ Pass the version only — ` 1.4.0 ` , not ` 1.4.0 (312) ` . Build numbers are not part
66+ of a semantic version, and the rules are compared as semantic versions.
67+
4868## Or draw your own
4969
5070``` tsx
0 commit comments