iamport / iamport_flutter

Flutter App에서 아임포트 결제서비스 연동을 위한 모듈입니다.
MIT License
67 stars 36 forks source link

0.10.14 android canLaunch 관련 #120

Closed syonkr closed 4 months ago

syonkr commented 4 months ago

[이전코드]

    if (Platform.isIOS) {
      try {
        if (await canLaunch(this.url)) {
          return await launch((await this.getAppUrl())!);
        } else {
          return await launch((await this.getAppUrl())!);
        }
      } catch (e) {
        return await launch((await this.getMarketUrl())!);
      }
    } else if (Platform.isAndroid) {
      try {
        return await launch((await this.getAppUrl())!);
      } catch (e) {
        return await launch((await this.getMarketUrl())!);
      }
    }

[현재코드]

    if (Platform.isIOS) {
      opened = await launchUrlString(appUrl);
    } else if (Platform.isAndroid) {
      if (await canLaunchUrlString(appUrl)) {
        opened = await launchUrlString(appUrl);
      }
    }

현재 다음과 같이 코드가 변경이 되었는데 canLaunchUrlString을 확인해보았을때 내부에서 canLaunch를 호출하는것으로 보입니다. android에서 canlaunchUrlString이 제대로 작동할지 의문입니다.

가시성관련 정책 변경 이슈 때문에 android에서 launch로만 작동하고 ios에서는 LSApplicationQueriesSchemes에 scheme 추가를 통해 해결했던것으로 보입니다

0.10.14에서 변경된 코드가 작동하려면 가시성 관련 안내를 readme, example에 추가하거나, launchUrlString으로만 작동하거나, ios와 android의 코드가 서로 뒤바뀌거나 해야할것으로 보입니다.

관련 이슈 확인 부탁드립니다.