簡體   English   中英

如何使用 react-native-version-check 打開 App Store 而不是 iTunes store

[英]How to open App Store instead of iTunes store with react-native-version-check

如果更新可用,我正在使用 react-native-version-check 打開應用商店/Play 商店,但在 iOS 上它打開 iTunes 商店,我想打開 AppStore。
這是我的代碼:

 _onPressUpdate = async () => { Linking.openURL(await VersionCheck.getStoreUrl({ignoreErrors: false, appID: "407690035", appName: "hotel-tonight-last-minute", packageName: "com.hoteltonight.android.prod"})); } // this appID and appName is just from some random app on the app store for testing

從本機應用程序打開應用程序商店。 去谷歌搜索你的應用程序在應用程序商店復制該網址

您的應用應該在應用商店上線以生成鏈接

 const url = Platform.OS === 'android' ?
                    'https://play.google.com/store/apps/details?id=YOUR_APP_ID'   :  'https://apps.apple.com/us/app/doorhub-driver/id_YOUR_APP_ID'
                Linking.openURL(url)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM