我正在尝试在AppStore / Play商店中打开此应用。
我找不到此应用程序的深层链接URL。因此,我决定在App Store / Play商店中打开应用程序的主页。
我可以使用以下代码在Play商店中打开
:let GOOGLE_APP_ID = 'ca.gc.hcsc.canada.stopcovid';
let googleAppDeepLinkURL ='https://play.google.com/store/apps/details?id=ca.gc.hcsc.canada.stopcovid';
if (Platform.OS === 'android') {
Linking.canOpenURL(googleAppDeepLinkURL).then((s) => {
Linking.openURL(`market://details?id=${GOOGLE_APP_ID}`).catch((err) =>
Linking.openURL(
`http://play.google.com/store/apps/details?id=${GOOGLE_APP_ID}`,
).catch((err) => console.error('An error occurred', err)),
);
});
}
如何通过iPhone在App Store中打开应用页面?