zealot icon indicating copy to clipboard operation
zealot copied to clipboard

[Bug]: iOS13上不显示安装按钮

Open mlch911 opened this issue 1 year ago • 9 comments

部署方式 | How to Deploy

使用一键部署脚本 | Using zealot-docker on-click install (Default)

部署版本 | Version

5.0.0-nightly

Git 哈希值 (长度 40)| Git Ref (40 length)

e361f189444bcf491ff87eda2d14011020e3c417

反代服务 | Reverse Proxy

none

HTTPS 证书类型 | HTTPS(SSL)

可受信任的证书 Verified SSL

已阅读文档 | Read the document

  • [X] 已阅读 | Yes

描述 | Description

iOS13设备访问网页,没有安装按钮 image

问题日志 | Relevant log output

No response

mlch911 avatar Oct 30 '23 09:10 mlch911

  1. 什么设备
  2. User Agent 是什么

icyleaf avatar Oct 30 '23 12:10 icyleaf

iphone se,ua我明天看看

mlch911 avatar Oct 30 '23 12:10 mlch911

顺便看看是不是浏览器禁用了 JavaScript,一般情况下只要是 iOS 设备都不会不展示的

icyleaf avatar Oct 30 '23 12:10 icyleaf

8839cfdaa117ac53e7773af84f93b94bbd57ab29 解决了包名过长的问题

icyleaf avatar Oct 31 '23 05:10 icyleaf

UA Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1

mlch911 avatar Oct 31 '23 09:10 mlch911

顺便看看是不是浏览器禁用了 JavaScript,一般情况下只要是 iOS 设备都不会不展示的

我看了设置里没有禁用

mlch911 avatar Oct 31 '23 09:10 mlch911

之前版本是正常的吗?我没有 SE 在模拟 UA 的环境下无法复现。

icyleaf avatar Nov 01 '23 03:11 icyleaf

我也不知道,第一次用这个老设备。

mlch911 avatar Nov 01 '23 03:11 mlch911

不确定是不是 js 编译的问题,微调了 728e7d0b09bf5607a98b1988ed41fe00ad5cb685 其他我也找不到具体哪里问题了

icyleaf avatar Nov 01 '23 07:11 icyleaf

原因是 iOS 14.4 以下不支持 ES6 的语法,导致没有执行 showIntallButton() https://caniuse.com/?search=static%20class%20fields

InjoyDeng avatar Mar 27 '24 13:03 InjoyDeng

拉取最新版本 nightly 试试

icyleaf avatar Mar 28 '24 02:03 icyleaf

我测试安装按钮在两个低版本 iOS 系统上的表现 使用 --target=es2020,在 iOS 13 上可见 使用 --target=es2017,在 iOS 10 上可见

InjoyDeng avatar Mar 28 '24 08:03 InjoyDeng

感谢测试,保证最大的兼容度我改成 es2017 吧

icyleaf avatar Mar 28 '24 11:03 icyleaf

fixed in 7dbb9ba8afdcd85e8f8c5b552c5b2a65fb5967b4

icyleaf avatar Mar 29 '24 02:03 icyleaf

测试了,没问题

mlch911 avatar Mar 30 '24 04:03 mlch911