Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.10.14 android canLaunch 관련 #120

Closed
syonkr opened this issue Jan 4, 2024 · 0 comments
Closed

0.10.14 android canLaunch 관련 #120

syonkr opened this issue Jan 4, 2024 · 0 comments

Comments

@syonkr
Copy link
Contributor

syonkr commented Jan 4, 2024

[이전코드]

    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의 코드가 서로 뒤바뀌거나 해야할것으로 보입니다.

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

@syonkr syonkr changed the title android canLaunch 관련 0.10.14 android canLaunch 관련 Jan 4, 2024
@syonkr syonkr closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant