TWA - 数字资产链接正常,但地址栏仍然可见

2024-04-10

我开发了一个渐进式 Web 应用程序,我想将其作为可信 Web 活动在 Play 商店中发布。 它是https://www.bagnoadriatico.it https://www.bagnoadriatico.it

遵循本指南https://developers.google.com/web/updates/2019/02/using-twa https://developers.google.com/web/updates/2019/02/using-twa

我从下载了该示例https://github.com/GoogleChromeLabs/svgomg-twa https://github.com/GoogleChromeLabs/svgomg-twa

我改变了配置

def twaManifest = [
    applicationId: 'com.simovinci.bagnoadriatico',
    hostName: 'www.bagnoadriatico.it', // The domain being opened in the TWA.
    launchUrl: '/mobile', // The start path for the TWA. Must be relative to the domain.
    name: 'BagnoAdriatico di Casalborsetti', // The name shown on the Android Launcher.
    themeColor: '#ff5c14', // The color used for the status bar.
    backgroundColor: '#ffff00' // The color used for the splash screen background.
]

然后我签署了 apk,构建并在 Play 商店上发布。

在网站中我通过 Digital Asset Link 创建了关联https://www.bagnoadriatico.it/.well-known/assetlinks.json https://www.bagnoadriatico.it/.well-known/assetlinks.json“语句列表生成器和测试器”表示操作成功 “成功!主机 www.bagnoadriatico.it 授予应用程序深度链接到 com.simovinci.bagno adriatico。”https://developers.google.com/digital-asset-links/tools/generator https://developers.google.com/digital-asset-links/tools/generator

地址栏仍然可见,我不知道为什么。

https://www.bagnoadriatico.it/mobile https://www.bagnoadriatico.it/mobile返回 200 http 代码。 PWA 经过 100% Lighthouse 验证。 钥匙指纹正确

=========================================

我尝试设置 launchUrl = "/" (在我删除 302 到移动版本之前)但没有任何改变。地址栏仍然可见。


如果您使用了 Google Play 的应用签名,您的 SHA 256 会发生变化。修复方法是从 Play 商店下载您的应用程序,然后使用同样来自 Play 商店的以下工具生成新的 assetlinks.json 文件:

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

TWA - 数字资产链接正常,但地址栏仍然可见 的相关文章

随机推荐