@tosspayments/widget-sdk-react-native/src/utils/convertUrl 문의드립니다.

"react-native": "0.73.5",
"@tosspayments/widget-sdk-react-native": "^1.2.7",

ConvertUrl . (react native 의 iOS )

로 ispmobile ,(url: ispmobile://vp?TID=NICETOKN......) 의 launchApp .

else if (Platform.OS === 'ios') {
      try {
        const appLink = await this.getAppLink();
        if (appLink) {
          return Linking.openURL(appLink);
        } else {
          const marketUrl = await this.getMarketUrl();
          return Linking.openURL(marketUrl);
        }


appLink : ispmobile://... 어 Linking.openURL .
, .

즉 getAppLink ,

    } else if (Platform.OS === 'ios') {
      this.appLink =
        this.appScheme === 'itmss' ? `https://${splitUrl[1]}` : this.url;
    }
  }

  async getAppLink(): Promise<string | undefined> {
    console.log('this.appLink:',this.appLink)
    return this.appLink;
  }


this.appLink = this.url , Linking.openURL(ispmobile://...) , .

'' .
        const convertUrl = new ConvertUrl(url)

        if (convertUrl.isAppLink()) {
          convertUrl.launchApp().then((isLaunch) => {
            if (isLaunch === false) {
            }
          })
        } else {
          return true
        }

.

Linking.openURL 때 catch 서 Promise Rejection .

Possible Unhandled Promise Rejection (id: 16):
Error: Unable to open URL: ispmobile://vp?TID=NICETOKN......
Was this page helpful?