Keling
Keling
  • 发布:2023-05-08 16:17
  • 更新:2023-06-08 18:48
  • 阅读:450

【报Bug】通过scheme唤起App,iOS端能唤起,但是获取不到链接和参数,安卓没问题。而且iOS端launcher的值一直是”default“。

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 13.3.1(a)

HBuilderX类型: 正式

HBuilderX版本号: 3.7.11

手机系统: iOS

手机系统版本号: iOS 16

手机厂商: 苹果

手机机型: 不限机型,iphonex iphone12都有

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
// App.vue文件  
onLaunch: function(options) {  
	var args= plus.runtime.arguments;  
  
	if(args){  
		// 处理args参数,如直达到某新页面等  
	}  
}
// manifest.json  
"ios" : {  
                "dSYMs" : false,  
                "urltypes" : "zujibaoapp,zujibao,g21re3",  
                "capabilities" : {  
                    "entitlements" : {  
                        "com.apple.developer.associated-domains" : [  ]  
                    }  
                }  
            },

操作步骤:

后台关闭App杀死进程,通过scheme链接“zujibao://ulink?a=1&b=2”唤起App

预期结果:

App.vue中,plus.runtime.arguments能获取“zujibao://ulink?a=1&b=2”这个链接,并且onLaunch的入参options的launcher属性值为scheme

实际结果:

iOS端(有问题):plus.runtime.arguments的值是{"name":"","path":"","query":"","id":0},并且onLaunch的入参options的launcher属性值为default。
Android端(正常):plus.runtime.arguments能获取“zujibao://ulink?a=1&b=2”这个链接,并且onLaunch的入参options的launcher属性值为scheme。

iOS端关闭过App了。

bug描述:

  1. 配置了scheme,可以通过scheme唤起iOS和Android,说明scheme配置的没问题。但是只有Android端可以通过plus.runtime.arguments拿到链接参数,而iOS获取不到参数,ios端plus.runtime.arguments的值是{"name":"","path":"","query":"","id":0}。
  2. iOS端的onLaunch的options参数也有问题,我是通过scheme唤起的App。options.launcher的值还是“default”,Android端没有问题,options.launcher的值是default
2023-05-08 16:17 负责人:DCloud_iOS_WZT 分享
已邀请:

最佳回复

DCloud_iOS_WZT

DCloud_iOS_WZT

pages.json文件下condition节点去掉 重新自定义基座就可以了

DCloud_iOS_WZT

DCloud_iOS_WZT

你打个自定义基座 然后appid私信我下 我看下

  • Keling (作者)

    发给你了


    2023-05-09 15:48

2***@qq.com

2***@qq.com

同样问题

要回复问题请先登录注册