14
8

More than 3 years have passed since last update.

iOS14でtrackingAuthorizationStatusのメモ

Last updated at Posted at 2021-01-06

環境

  • Xcode12.3
  • iOS 14.2 iPhone SE

条件

  1. 端末: 設定>プライバシー>トラッキング>Appからのトラッキング要求を許可 IMG_9760666317E9-1.jpeg
  2. アプリ: トラッキング要求ダイアログ IMG_2264.PNG

トラッキング要求の動き

端末 トラッキング要求 アプリ status
許可 - notDetermined
許可 authorized
拒否 denied
拒否 - denied
許可 denied
拒否 denied

想定通り。
トラッキング要求を出していない状態で、端末設定を拒否から許可に戻すとちゃんとnotDeterminedに戻ります

トラッキング要求を許可後の動き

アプリでトラッキング要求を許可した後に端末設定を拒否にした場合、こんなダイアログが出てくる
トラッキング要求をしていない場合や拒否した場合はダイアログがでない
IMG_729819AB963E-1.jpeg

「Appがトラッキングを続けることを許可する」を選ぶと、こんな画面なので端末で拒否しても取れるのかなと思ったらそんなことはなかった。
IMG_6D17ED26E52E-1.jpeg

再表示するとちゃんとオフになっています
IMG_8F6BE63E2509-1.jpeg

端末設定で再許可時のstatusをそのままにしてくれる動きのようです

ダイアログ status 端末設定で再許可時のstatus
Appがトラッキングを続けることを許可する denied authorized
「Appにトラッキングの停止を要求」 denied denied

端末拒否時のトラッキング要求の動き

また、端末で拒否時にトラッキング要求をするとdeniedが設定されて端末設定を許可に戻してもdeniedのままになります。
トラッキング要求を出していなければnotDeterminedに戻ります

端末拒否時

トラッキング要求 status 端末許可に変更後のstatus
denied notDetermined
denied denied
14
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
8