react-native-check-app-install icon indicating copy to clipboard operation
react-native-check-app-install copied to clipboard

Cannot able check any new App installed or not in IOS. Working Fine in Android

Open ChandreshRana opened this issue 5 years ago • 3 comments

Hi @redpandatronicsuk,

I want to check app installed or not in device, not from APP_LIST I found these two methods in package for check IOS. But it's not work.

FOR IOS,

static isAppInstalled(key) {
      return Platform.select({
      ios: () => { return this.isAppInstalledIOS(key); },
      android: () => { return this.isAppInstalledAndroid(key); }
   })();
}

static isAppInstalledIOS(key) {
   return this.checkURLScheme(APP_LIST[key].urlScheme, APP_LIST[key].urlParams);
}

FOR ANDROID,

static checkPackageName(packagename) {
    return new Promise((resolve, reject) => {
       CheckPackageInstallation.isPackageInstalled(packagename, (isInstalled) => {
          resolve(isInstalled);
       });
    });
}

Need some solution like the above android implement here.

Please give some solution regarding to check If the app is installed in the IOS device or not

ChandreshRana avatar Sep 18 '20 04:09 ChandreshRana

Did anyone got some solution for this?

amit13091992 avatar Feb 03 '21 12:02 amit13091992

I'm using checkURLScheme and it only works for Android. iOS always comes back False.

AppInstalledChecker.checkURLScheme('slack').then((isInstalled) => { if(isInstalled) {...} } });

aGORyan avatar Feb 15 '21 17:02 aGORyan

For some of you might not know, Apple has restricted to call other apps if you haven't added the scheme into info.plist starting on iOS 9.0.

So if you want to check an app is installed or not in iOS app, first you need to add the URLScheme into info.plist, and then call the function in this package again. Otherwise, you will always get false for the response.

For further information, please read the important note in this official document: https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl#discussion https://reactnative.dev/docs/linking#canopenurl

jagwingchoy avatar Mar 13 '21 12:03 jagwingchoy