iOS: the alert-unrecognized warning of `open --launch-url` says to `alert accept`, which grants App Tracking Transparency when that is the alert
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- ios, typescript
- 领域
- cli, documentation, mobile
调研方向
从 packages/daemon/src/sessions/session-lifecycle/internal/session-open-execution.ts 中的 launchConfirmationUnansweredWarning 开始,然后检查 issue 引用的 open 帮助内容和 website/docs/docs/commands.md 中的相关段落。更新 alert-unrecognized 的指导,使调用方先检查警报,并根据其标题决定是否接受。三处来源都不再建议对无法识别的警报使用 alert accept 时,即为完成;可选结果字段属于额外范围。
由索引模型根据 Issue 内容生成。
描述
Summary
On an iOS simulator, open --launch-url recognizes only the English Open in “…”? confirmation with the Cancel and Open buttons. For any other alert, it exits 0 with launchConfirmation: "unanswered", launchConfirmationReason: "alert-unrecognized", and this warning:
iOS shows an alert this open did not recognize (alert-unrecognized), so it left the launch URL unconfirmed. Inspect the current alert with
alert getbefore answering it withalert accept.
agent-device help open gives the same next step: "in both cases inspect the warning and answer with alert get then alert accept". So does commands.md: "Inspect with alert get, then answer with alert accept."
But an alert that open does not recognize is not always the launch confirmation. In our runs, it was the App Tracking Transparency prompt that the app shows at launch (Allow “<app>” to track your activity…). An agent that follows the warning taps Allow, and the simulator's TCC.db records auth_value 2 (allowed) for kTCCServiceUserTracking. The agent gets no signal that it granted a permission, and every later check that depends on the tracking answer is wrong.
Environment
- agent-device 0.21.29 (measured). The warning, the
openhelp andcommands.mdare unchanged in 0.21.30, 0.21.31 and onmain(b08b5e7). - Xcode 27.1, iPhone 17e simulator on iOS 27.0, English locale.
- Expo development build, with a custom URL scheme that the app owns. The app shows the App Tracking Transparency prompt at launch.
- The app had already received a deep link on this simulator, so iOS did not show the
Open inconfirmation. The tracking answer was reset before each run.
Steps
xcrun simctl privacy "$SIM" reset all <bundle-id>
npx agent-device open <bundle-id> --launch-url "<scheme>://..." --platform ios --udid "$SIM" --relaunch --json
npx agent-device alert get --platform ios --udid "$SIM"
npx agent-device alert accept --platform ios --udid "$SIM" # the step that the warning gives
sqlite3 ~/Library/Developer/CoreSimulator/Devices/"$SIM"/data/Library/TCC/TCC.db \
"select auth_value from access where service='kTCCServiceUserTracking' and client='<bundle-id>'"
Results
openexited 0 withlaunchConfirmation: "unanswered",launchConfirmationReason: "alert-unrecognized"and the warning above in 9 runs out of 9, 4 of them at the largest Dynamic Type size.alert getreturned the title of the App Tracking Transparency prompt.alert accept, as the warning says, recordedauth_value2 (allowed).alert dismissrecorded 0 (denied).
Cause
answerLaunchConfirmation returns alert-unrecognized for every alert that isLaunchConfirmation rejects. At that point, open does not know whether the alert is a launch confirmation in another language or a different alert. But launchConfirmationUnansweredWarning gives alert accept as the answer in both cases.
The title and the buttons that open read go only to the warn diagnostic ios_launch_confirmation_unanswered. serializeOpenResult does not return them, so a --json caller must run alert get to know which alert it is.
Suggested fix
- For
alert-unrecognized, do not tell the caller toalert accept. Tell it to read the alert withalert getand to answer it from its title:alert acceptonly when it is the launch confirmation (for example, a translatedOpen inprompt). Any other alert, such as a permission prompt, is the app's own alert, and the caller answers it on its own terms. Apply the same change to theopenhelp and tocommands.md. - Optionally, return the alert's title and buttons in the
openresult when the reason isalert-unrecognized(for example,launchConfirmationAlert: { title, buttons }). The caller can then choose its answer without one morealert get.
Expected
The alert-unrecognized warning does not tell the caller to accept an alert that may not be the launch confirmation.
Related
- #3732 added
alert-unrecognizedand this warning. It tested the warning only with a translated launch confirmation (French simulator), wherealert acceptis the correct answer. - #3627 / #3715:
alert dismisstappedAllowon the same App Tracking Transparency prompt (fixed).
- 主要语言
- TypeScript
- 星标
- 5.1k
- 派生
- 339
- 平均合并
- 12 小时 57 分钟
- 30 天内合并 PR
- 653
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
callstack/agent-device#3945 ·
维护者通常 1 天内回复
-
Limrun iOS fill reports success but drops non-ASCII text可能已有人在做 @mvanhorn 于 4 天前认领。 未关闭bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 87/100
callstack/agent-device#3819 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
iOS keyboard capture can race dismissal and omit the input assistant bar可能已有人在做 @shamilovtim 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 51/100
callstack/agent-device#3957 ·
维护者通常 1 天内回复
-
iOS fill can report TEXT_ENTRY_MISMATCH before the confirmation deadline可能已有人在做 @shamilovtim 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
callstack/agent-device#3952 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
microsoft/playwright#43640 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
grasshopper-protocol/grsshppr#172 ·
维护者通常 1 天内回复
-
bug help wanted
难度 2/5 1-3 小时 新手友好度 78/100
Tencent/teamai-cli#1397 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
DouyinFE/semi-design#3641 ·
维护者通常 3 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复