ReactNative
内部打开外部应用,具体使用方法如下:
一、常用URL Scheme
QQ: mqq://
微信: weixin://
新浪微博: weibo:// (sinaweibo://)
腾讯微博: tencentweibo://
淘宝: taobao://
支付宝: alipay://
美团: imeituan://
知乎: zhihu://
优酷: youku://
二、配置Scheme白名单(仅ios,Android平台不需要)
在项目的info.plist中添加一LSApplicationQueriesSchemes,类型为Array。
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin://</string>
</array>
三、Linking跳转
import { Linking } from 'react-native';
// 2、跳转代码
Linking.canOpenURL('weixin://').then(supported => { // weixin:// alipay://
if (supported) {
Linking.openURL('weixin://');
} else {
}
});