如何制作“为此应用评分”在React Native应用程序中链接? [英] How to make a "Rate this app" link in React Native app?

查看:361
本文介绍了如何制作“为此应用评分”在React Native应用程序中链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iOS上的React Native应用程序中将用户正确链接到App Store应用程序的评论页面?

How to properly link a user to reviews page at App Store app in React Native application on iOS?

推荐答案

对于iOS你必须将 LSApplicationQueriesSchemes 作为数组参数添加到 Info.plist 并添加项目。

For iOS you Have to add LSApplicationQueriesSchemes as Array param to Info.plist and add items to it.

例如,对于AppStore链接,我使用 itms-apps 作为此数组中的一个参数。

For example to AppStore linking I use itms-apps as one of params in this array.

您的链接应该是这样的

itms-apps://itunes.apple.com/us/app/id$ {APP_STORE_LINK_ID}?mt = 8

好吧。现在你有了所有要做的事情链接组件与方法

Well. Now you have all stuff to do Link component with method

handleClick () {
    Linking.canOpenURL(link).then(supported => {
        supported && Linking.openURL(link);
    }, (err) => console.log(err));
}

这篇关于如何制作“为此应用评分”在React Native应用程序中链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆