Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

iOS: alert dismiss taps "Allow" on the App Tracking Transparency prompt

クローズ 初心者向け
#3,627 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ios, swift
領域
mobile, testing

調査の方向性

バグは apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift の chooseAlertButton にあり、dismiss のフォールバックが buttons.last を返しています。まず isDismissButton のラベルリストと dismiss 分岐を確認し、accept 分岐に既にあるガードと比較してください。"Ask App Not to Track" が dismiss のラベルとして認識されるか、dismiss のフォールバックが accept 系のボタンを選ばなくなり、シミュレータでの実行時に ATT プロンプトでトラッキングが denied のままになれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug ready-for-agent

Problem

On an iOS simulator, alert dismiss on the App Tracking Transparency prompt (buttons "Ask App Not to Track" and "Allow") taps "Allow". The command prints dismissed and exits 0, but iOS records an authorization, exactly as after alert accept.

Nothing in the output reveals it: a test that dismisses the prompt to decline tracking silently runs the app with tracking authorized.

Environment

  • agent-device 0.21.24 (code unchanged in 0.21.27, 0.21.28-nightly.20261014.57 and main at 542fb77, see Cause)
  • macOS 26.6.2, Xcode 27.0, Node 24.21.0
  • Simulator: iPhone 17, iOS 27.0, English locale
  • Target app: an Expo development build that calls requestTrackingAuthorization on launch

Reproduction

xcrun simctl privacy "$SIM" reset all <bundle id>        # ATT status back to notDetermined
npx agent-device open <bundle id> --platform ios --udid "$SIM" --relaunch
npx agent-device alert wait 15000                         # "Allow “<app>” to track your activity across other companies’ apps and websites?"
npx agent-device alert dismiss                            # "dismissed", exit code 0
sqlite3 ~/Library/Developer/CoreSimulator/Devices/"$SIM"/data/Library/TCC/TCC.db \
  "select auth_value from access where service='kTCCServiceUserTracking' and client='<bundle id>'"

The development build was opened with --launch-url and its dev-client deep link; any app that requests tracking authorization on launch shows the same prompt. auth_value is 0 when tracking is denied and 2 when it is authorized.

Response to the prompt Runs auth_value
alert dismiss 4 2 (authorized), 4 of 4
alert accept — 2 (authorized)
find text "Ask App Not to Track" click, or click on the button ref 4 0 (denied), 4 of 4

Cause

chooseAlertButton in RunnerTests+Alert.swift:

return buttons.first(where: { isDismissButton($0.label) }) ?? buttons.last

"Ask App Not to Track" is not in the isDismissButton list (cancel, close, dismiss, don't allow, not now, no, keep browsing, later), so dismiss falls back to buttons.last, which is "Allow" on this prompt.

The accept branch already guards against the symmetric mistake: when no accept label matches, it only taps a lone button that is not a dismiss button. The dismiss branch has no such guard and can tap a button that isAcceptButton recognizes ("allow").

Suggested fix

Either or both:

  • add "ask app not to track" to the dismiss labels;
  • in the dismiss fallback, never pick a button that isAcceptButton matches (e.g. the last button that is not an accept button), and fail when every button is an accept button, rather than tap one.

The second keeps dismiss from authorizing on any prompt whose decline label is unknown, including localized ones.

Expected behavior

alert dismiss on the App Tracking Transparency prompt taps "Ask App Not to Track", or fails without tapping, and never records an authorization.

主要言語
TypeScript
スター
5k
フォーク
334
平均マージ
12時間 2分
マージ済み PR(30日)
678

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。