繁体   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