7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

iOS14.4のIDFAまとめ

Last updated at Posted at 2021-01-07

iOS 14.4
Xcode Version 12.3 (12C33) で検証

結果

OS isAdvertisingTrackingEnabled trackingAuthorizationStatus uuidString
iOS13 true - 取得できた
iOS13 false - 00000000-0000-0000-0000-000000000000
iOS14.4 true notDetermined 取得できた
iOS14.4 false denied 00000000-0000-0000-0000-000000000000
iOS14.4 true authorized 取得できた
iOS14.4 true denied 00000000-0000-0000-0000-000000000000

その他注意点

  • isAdvertisingTrackingEnabled = false の場合 iOS14以降でもアラートが表示されずに denied 扱い
  • requestTrackingAuthorization の completion は、アラートが表示されなくても呼ばれる
  • アラートで選択肢を選ばずに無理やり電源を切った場合は denied 扱い
  • restricted はよくわかりませんでしたが denied と同じ扱いで良さそう?
  • isAdvertisingTrackingEnabled の値が iOS14 でもちゃんと取れるようになってるっぽい
  • 今の所アラート出さないほうがIDFA取得できちゃいそう...
  • ただ短い期間で動きが変わりがちなので安心できない...

備考

  • iOS14.2とiOS14.4で調べましたが同じ挙動でした(2021/01/07)
  • 使用コード
        if #available(iOS 14, *) {
            print(ATTrackingManager.trackingAuthorizationStatus)
        } else {
            // Fallback on earlier versions
        }
        print(ASIdentifierManager.shared().isAdvertisingTrackingEnabled)
        print(ASIdentifierManager.shared().advertisingIdentifier)
7
4
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
7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?