如何在iOS上的React Native应用程序中将用户正确链接到App Store应用程序的评论页面?
对于iOS,您必须向其中添加LSApplicationQueriesSchemes
Array参数Info.plist
并为其添加项目。
例如,到AppStore链接时,我itms-apps
用作此数组中的参数之一。
例如:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-apps</string>
</array>
您的链接应该像这样
itms-apps://itunes.apple.com/us/app/id${APP_STORE_LINK_ID}?mt=8
。
出色地。现在,您拥有所有要做的事情用方法链接组件
handleClick () {
Linking.canOpenURL(link).then(supported => {
supported && Linking.openURL(link);
}, (err) => console.log(err));
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句