HomeiOS Developmentjavascript - How I can open an exterior app from React Native...

javascript – How I can open an exterior app from React Native in IOS if the app is put in go to an app different view and go to APP Retailer


I wish to open an exterior app from React Native in IOS if the app is put in go to an app different view and go to APP Retailer. I’m finished with that in Android utilizing react-native-send-intent
works positive in Android however not working in ios.

const openExternalApp = merchandise => {
    // console.log('merchandise financial institution', merchandise);
    if (Platform.OS == 'android') {
      if (merchandise) {
        SendIntentAndroid.isAppInstalled(merchandise.BundelID).then(suport => {
          if (suport) {
            SendIntentAndroid.openApp(merchandise.BundelID);
          } else {
            Linking.canOpenURL(merchandise.androidAppLink).then(suport => {
              if (suport) {
                Linking.openURL(merchandise.androidAppLink);
              }
            });
          }
        });
      }
    } else {
      // console.log('ios');
      AppLink.maybeOpenURL(merchandise?.ios?.url, {
        appName: merchandise?.ios?.identify,
        appStoreId: merchandise?.ios?.appId,
        appStoreLocale: {appStoreId: merchandise?.ios?.appId},
        // playStoreId,
      })
        .then(() => {
          // do stuff
        })
        .catch(err => {
          // deal with error
        });
    }
  };

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments