[AppGalleryConnectLinkManageService]ios bundleId 没有权限

问题描述

我写了一个使用华为Applinking生成链接方法

  fun generateLink(text: String,promo: String): Single<String> = Single.create { emitter ->
    AppLinking.newBuilder()
            .setUriPrefix(Const.Deeplink.BASE_URL_APPLINKING)
            .setDeepLink(Uri.parse(Const.Deeplink.BASE_WEB + addParams(mapOf(Const.Deeplink.ParaM_PROMOCODE to promo))))
            .setAndroidLinkInfo(AppLinking.AndroidLinkInfo.newBuilder()
                    .setAndroidDeepLink(AGS + Const.Deeplink.PACKAGE_NAME_ANDROID)
                    .build()
            )
            .setIOSLinkInfo(AppLinking.IOSLinkInfo.newBuilder()
                    .setIOSDeepLink(AGS + Const.Deeplink.PACKAGE_NAME_IOS)
                    .setBundleId(Const.Deeplink.PACKAGE_NAME_IOS)
                    .build()
            )
            .buildShortAppLinking(ShortAppLinking.LENGTH.SHORT)
            .addOnSuccessListener { link ->
                Timber.e("${link.testUrl}")
                text.plus("\n").plus(link.shortUrl?.toString()).also {
                    emitter.onSuccess(it)
                    Timber.e(it)
                }
            }.addOnFailureListener {
                var dr = Const.Deeplink.PACKAGE_NAME_ANDROID
                var df = Uri.parse(Const.Deeplink.BASE_WEB + addParams(mapOf(Const.Deeplink.ParaM_PROMOCODE to promo)))
                emitter.onError(it)

            }
}

但是有错误

com.huawei.agconnect.applinking.AppLinkingException:  code: 204865654 message: [AppgalleryConnectLinkManageService]the ios bundleId does not have permission

有人遇到过吗? PACKAGE_NAME_IOS 有效 com.65gb.xxxxx.xxxxx

下班后

enter image description here

解决方法

更新

您需要将AppLinking iOS SDK集成到您的bundleID为com.65gb.xxxx.xxxx的iOS项目中,然后通过handleAppLinking接口接收获取配置好的iOSDeepLink。

有关如何在 iOS 中接收 AppLinking 的详细信息,请参阅 document

enter image description here


确保您的 iOS 应用程序的包 ID 与使用 setBundleId() 方法传递的参数相同。您可以在 AppGallery Connect 中查看包 ID。

应用链接用于项目下的所有应用。您只能在 AppGallery Connect 中包名称在同一项目中的应用之间实现重定向。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...