配置 manifest.json -> urlschemewhitelist 白名单
/* ios打包配置 */
"ios" : {
"UIBackgroundModes" : [ "audio" ],
"urlschemewhitelist" : [ "baidumap", "iosamap", "snssdk1128", "snssdk32" ]
},
1 launchApplication
let url = 'snssdk112 8://lynxview?surl=https://lf-dy-sourcecdn-tos.bytegecko.com/obj/byte-gurd-source/1325/gecko/resource/alliance_lynx_live_room_middle_page/app/template.js&fallback_url=https://alliance.jinritemai.com/lynx/pages/live-room-middle-page/app/template/index.html&hide_nav_bar=1&dynamic=2&live_room_schema=snssdk1128://webcast_room?room_id=7130368027991739166&enter_method=cps_open_deeplink&enter_from_merge=cps_open_deeplink&ecom_live_params=%7B%22cps_track%22%3A%22Cj0InqLk-8ICEOgIGihkeV8xMDcwOTg1ODU0Mjg4MTU5NzA1NjRfOTA3Nl8xMjE3MDQwNjIzIgUxXzFfMUgAEgwInpaAkpf-ifpiEAE%22%7D'
// #ifdef APP-PLUS
plus.runtime.launchApplication({ action: url }, function(res) {
console.log('打开了吗', res);
uni.showToast({
title: res.message,
icon: 'none'
})
});
// #endif
// #ifdef H5
window.open(d.deeplink);
// #endif
2 openURL
// #ifdef APP-PLUS
plus.runtime.openURL(url, function(res) {
console.log('打开了吗', res);
uni.showToast({
title: res.message,
icon: 'none'
})
});
// #endif
// #ifdef H5
window.open(d.deeplink);
// #endif