![](/img/trans.png)
[英]React-Native: How to open google play store from react native app?
[英]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.