ios中H5无法通过urlscheme无法唤起app

html代码:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Title</title>

<script type="text/javascript" src="JS/jquery-3.1.1.min.js"></script>

</head>

<body>

<p>访问成功</p>

<script language="javascript">

function custom_close() {

window.location = "cxc://";

}

</script>

<input width="50%" id="btnClose" type="button" value="返回ios楚小诚" onClick="custom_close()" />

<br /><br /><br /><br /><br />

      <a href="hbuilder://">返回app</a>

<br /><br /><br /><br /><br />

      <a href="cxc://io.cxc.user">返回楚小诚</a>

<br /><br /><br /><br /><br />

      <a href="cxc://">返回楚小诚</a>

</body>

</html>

android通过H5中的超级链接可唤起app,但是IOS无法通过这种方式唤起APP,求解?

ios通过Safari可以唤起

环境配置:

"apple": {

"appid": "io.cxc.user",/iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5/

"mobileprovision": "",/iOS应用打包配置文件/

"password": "",/iOS应用打包个人证书导入密码/

"p12": "",/iOS应用打包个人证书,打包配置文件关联的个人证书/

"devices": "universal",/iOS应用支持的设备类型,可取值iphone/ipad/universal/

"UIReserveStatusbarOffset": false,

"frameworks": [],

"urltypes":[

{

"urlidentifier":"io.cxc.user",

"urlschemes":["cxc"]

}

],

"plistcmds": [

"Set :NSPhotoLibraryUsageDescription 上传图片需要使用相册权限",

"Set :NSCameraUsageDescription 上传图片需要使用相机拍照",

"Set :NSPhotoLibraryAddUsageDescription 保存图片相册权限",

"Set :NSLocationAlwaysUsageDescription 添加门店信息需要获取当前坐在所标",

"Set :NSLocationWhenInUseUsageDescription 添加门店信息需要获取当前坐在所标",

"Set :NSSpeechRecognitionUsageDescription app内置语音提示"

]

},

"google": {

"packagename": "io.cxc.user",/Android应用包名,如io.dcloud.HelloH5/

"keystore": "",/Android应用打包使用的密钥库文件/

"ImmersedStatusbar": true,

"password": "",/Android应用打包使用密钥库中证书的密码/

"aliasname": "",/Android应用打包使用密钥库中证书的别名/

"schemes":["cxc"],

"permissions": ["<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"com.android.launcher.permission.INSTALL_SHORTCUT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"com.android.launcher.permission.UNINSTALL_SHORTCUT\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>"]

},



2018-07-09 19:16 添加评论 分享
已邀请:
0

SDK_骁骑

赞同来自:

在ios基座中用如下的href进行测试超链接打开网易新闻有效,请提供一下你的相关代码
<a href="newsapp://">测试点击打开网易新闻</a>


0

1461043353@qq.com

赞同来自:

你好,能提供下h5跳转android应用的代码吗,,我这边配置不起作用


要回复问题请先登录注册