src/utils.js
function isAppInstalled(app, prefixes) {
  return new Promise((resolve) => {
    if (!(app in prefixes)) {
      return resolve(false)
    }

    Linking.canOpenURL(prefixes[app])
      .then((result) => {
        resolve(!!result)
      })
      .catch(() => resolve(false))
  })
}
function isAppInstalled(app, prefixes) {
  return new Promise((resolve) => {
    if (!(app in prefixes)) {
      return resolve(false)
    }

    Linking.canOpenURL(prefixes[app])
      .then((result) => {
        resolve(!!result)
      })
      .catch(() => resolve(false))
  })
}
function isAppInstalled ( app , prefixes ) { return new Promise ( ( resolve ) => { if ( ! ( app in prefixes ) ) { return resolve ( false ) } Linking . canOpenURL ( prefixes [ app ] ) . then ( ( result ) => { resolve ( ! ! result ) } ) . catch ( ( ) => resolve ( false ) ) } ) }
Check if a given map app is installed.

@param {string} app
@returns {Promise<boolean>}
Check if a given map app is installed .