How to use expo-ota - 6 common examples

To help you get started, we’ve selected a few expo-ota examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
useEffect(() => {
    console.warn('They say it is registered. Is it?');
    OTA.addListener(event => {
      Alert.alert('Event: ', `${JSON.stringify(event)}`);
    });
  }, []);
github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
const checkForUpdates = async () => {
    const value = OTA.checkForUpdateAsync();
    value
      .then(result => {
        Alert.alert('Result: ', `${JSON.stringify(result)}`);
      })
      .catch(e => {
        Alert.alert('Error!', `${JSON.stringify(e.message)}`);
      });
  };
github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
const clearCache = () => {
    OTA.clearUpdateCacheAsync()
      .then(result => {
        Alert.alert('Result: ', `${JSON.stringify(result)}`);
      })
      .catch(e => {
        Alert.alert('Error!', `${JSON.stringify(e.message)}`);
      });
  };
github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
const fetchUpdates = () => {
    OTA.fetchUpdateAsync()
      .then(result => {
        Alert.alert('Result: ', `${JSON.stringify(result)}`);
      })
      .catch(e => {
        Alert.alert('Error!', `${JSON.stringify(e.message)}`);
      });
  };
github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
const manifest = () => {
    OTA.readCurrentManifestAsync()
      .then(result => {
        Alert.alert('Result: ', `${JSON.stringify(result)}`);
      })
      .catch(e => {
        Alert.alert('Error!', `${JSON.stringify(e.message)}`);
      });
  };
github expo / expo / apps / expo-ota-example-app / App.tsx View on Github external
const reload = () => {
    OTA.reload()
      .then(result => {
        Alert.alert('Result: ', `${JSON.stringify(result)}`);
      })
      .catch(error => {
        Alert.alert('Error!: ', `${JSON.stringify(error.message)}`);
      });
  };