Files
youle_app_ios_v2/ylgamehall
joywayerandClaude Opus 4.7 b54803966a IPA 升级跳转后等 didEnterBackground 自动 exit(0),让 iOS 顺利替换 IPA
【问题】
当前点"确定升级"后跳 Safari,但旧版本 App 仍在前台/后台 active —— iOS 安装
新 IPA 时会卡住或要求用户手动 kill 旧 App,体验不顺。

【方案】
跳 Safari 后挂一次性 didEnterBackground 监听 → 0.3s 后 exit(0):
- 等系统完成 active → inactive → background 切换再 exit,不会被 Springboard 视为 crash
- 比直接 exit(0) 优雅,避免前台闪退动画
- 用户从 Safari 取消回来不退(下次切后台才触发)

【UX 同步】
alert message 提示"确认后将跳转下载并自动退出当前 App",让用户预期对齐。

不影响 H5 契约(纯原生外壳交互)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-27 21:11:35 +08:00
..