diff --git a/Example/testHotUpdate/package.json b/Example/testHotUpdate/package.json index 63fdf80..4c5236f 100644 --- a/Example/testHotUpdate/package.json +++ b/Example/testHotUpdate/package.json @@ -18,7 +18,7 @@ "react-native": "0.69.8", "react-native-paper": "^5.12.1", "react-native-safe-area-context": "^4.8.2", - "react-native-update": "^10.5.4", + "react-native-update": "^10.6.0-beta.0", "react-native-vector-icons": "^10.0.3" }, "devDependencies": { diff --git a/Example/testHotUpdate/src/index.tsx b/Example/testHotUpdate/src/index.tsx index 27cb93d..021c461 100644 --- a/Example/testHotUpdate/src/index.tsx +++ b/Example/testHotUpdate/src/index.tsx @@ -47,7 +47,7 @@ function App() { onValueChange={v => { setUseDefaultAlert(v); client?.setOptions({ - useAlert: v, + updateStrategy: v ? null : 'alwaysAlert', }); setShowUpdateSnackbar(!v); }} diff --git a/Example/testHotUpdate/yarn.lock b/Example/testHotUpdate/yarn.lock index 06941dd..75afd8f 100644 --- a/Example/testHotUpdate/yarn.lock +++ b/Example/testHotUpdate/yarn.lock @@ -6231,10 +6231,10 @@ react-native-safe-area-context@^4.8.2: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.8.2.tgz#e6b3d8acf3c6afcb4b5db03a97f9c37df7668f65" integrity sha512-ffUOv8BJQ6RqO3nLml5gxJ6ab3EestPiyWekxdzO/1MQ7NF8fW1Mzh1C5QE9yq573Xefnc7FuzGXjtesZGv7cQ== -react-native-update@^10.5.4: - version "10.5.4" - resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.5.4.tgz#00bb26ad021bb85b12f0daa435fb118259c816e1" - integrity sha512-6/AmsS8lOy5dJC4urWtFvhGmnqGJbabN2xnMVkZz5thLiMjcrNXipzpAN6FlHezdyPq/7wrsDCzpcgBnQKQRRg== +react-native-update@^10.6.0-beta.0: + version "10.6.0-beta.0" + resolved "https://registry.yarnpkg.com/react-native-update/-/react-native-update-10.6.0-beta.0.tgz#5414989a44f7bc94c97a8c29661c3fc4f43521d8" + integrity sha512-p/nTO/0qZhgxcmUXoiBkRvBa1yo3MocbJL4dMHboqOtK3TtUYhilP9O6fZQ9FBev4BjTyHBeXDjwT6eutw9gXg== dependencies: nanoid "^3.3.3" diff --git a/src/client.ts b/src/client.ts index d09e323..b1150e3 100644 --- a/src/client.ts +++ b/src/client.ts @@ -33,7 +33,7 @@ export class Pushy { appKey: '', server: defaultServer, autoMarkSuccess: true, - updateStrategy: 'alwaysAsk', + updateStrategy: 'alwaysAlert', checkStrategy: 'both', logger: noop, debug: false, diff --git a/src/provider.tsx b/src/provider.tsx index f75e5b8..16a61d4 100644 --- a/src/provider.tsx +++ b/src/provider.tsx @@ -47,7 +47,7 @@ export const PushyProvider = ({ Alert.alert(...args); } }, - [options], + [options.updateStrategy], ); const switchVersion = useCallback(() => {