8.8 released—CSS Media Query support, SF Symbols and much more...
Learn more

View on GitHub


A plugin that checks if an app is installed on a device.


npm install @nativescript/appavailability

Use @nativescript/app-availability

// examples of what to pass:
// - for iOS: "maps://", "twitter://", "fb://"
// - for Android: "com.facebook.katana"
available('twitter://').then((avail: boolean) => {
  console.log('App available? ' + avail)

Open an app (with web fallback)

To open an app installed on the device, call the openUrl() method on the Utils class. Pass the app's identifier URL to the method.

The code below asynchronously checks if the Twitter mobile app is available on the device. If the app is availabe, openUrl() opens it . Otherwise, openUrl() opens the website instead.

import { available } from '@nativescript/appavailability'
import { Utils } from '@nativescript/core'

const twitterScheme = 'twitter://'
available(twitterScheme).then((available) => {
  if (available) {
    // open in the app
      twitterScheme +
        (isIOS ? '/user?screen_name=' : 'user?user_id=') +
  } else {
    // open in the default browser

To synchronously check for an app's availability, use the availableSync() function.

import { availableSync } from '@nativescript/appavailability'
import { Utils } from '@nativescript/core'

if (availableSync('twitter://')) {
    'twitter://' +
      (isIOS ? '/user?screen_name=' : 'user?user_id=') +
} else {

Determine the correct identifier of an app.

  • Android : search the Play Store and use the id in the URL. For Twitter this is com.twitter.android because the URL is https://play.google.com/store/apps/details?id=com.twitter.android.

  • iOS: Open Safari on your iPhone and type, for example,'twitter://' in the address bar. If the app launches, use that URL as the identifier.

iOS whitelisting

To get useful results on iOS 9+, whitelist the URL Scheme you're querying in the application's Info.plist.

For example, to query for twitter://, whatsapp:// and fb://, edit app/App_ResourcesiOS/Info.plist as follows:


Android Query Permission

Starting from Android API level 30 (Android 11), you must explicitly declare your app's intent to interact with other apps in the Android manifest file AndroidManifest.xml.

        <package android:name="com.whatsapp" />

    <application ...>

Replace com.whatsapp with the package name of the app you want to interact with.


MethodsReturn TypeDescription
available(packageName:string)Promise<boolean>Asynchronously checks if the app with the specified packageName is installed on the device.
availableSync(packageName:string)booleanSynchronously checks if the app with the specified packageName is installed on the device.


Apache License Version 2.0