6
1

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 1 year has passed since last update.

株式会社ピーアールオー(あったらいいな!を作ります)Advent Calendar 2021

Day 24

iOS15.2以降で使えるAppプライバシーレポート機能で確認できる内容について

Last updated at Posted at 2021-12-28

概要

先日12/14にiOS15.2がリリースされましたが、新たにAppプライバシーレポートという機能が使えるようになりました。
最近この機能で具体的にどういった内容を見ることが出来るかについて調べる機会があったのでそのメモです。
ベータ版時点で当該機能については知っていましたが、思った以上に丸見えなので特にアプリ開発者は把握したうえで設計・実装時に留意しておくのが良いと思います。

Appプライバシーレポート機能で確認できる内容

次のとおりです。また、これらのログは過去7日間分まで保持しているようです。

  • データとセンサーアクセス
    • 個々のアプリが位置情報やマイクなどデバイスセンサーや機密性の高いリソースへアクセスした日時のログ
  • アプリのネットワークアクティビティ
    • に個々のアプリがネットワークアクセスした際のドメイン情報や累積アクセス回数のログ
  • Webサイトのネットワークアクティビティ
    • 個々のアプリがWebサイトアクセスした際のドメイン情報や累積アクセス回数のログ

実際の画面

[プライバシー]> [Appプライバシーレポート]から設定をオンにすると記録がはじまります。
記録される内容はアプリがバックグラウンド、フォアグラウンドいずれのアクティビティも記録されるようです。

Appプライバシーレポート_1 Appプライバシーレポート_2

以下のようにセンサーアクセス、ネットワークアクティビティともにアプリ別に詳細を見ることも可能です。

Appプライバシーレポート_3 Appプライバシーレポート_4

アクセス時刻や頻度などがまるわかり。

Appプライバシーレポート_4 Appプライバシーレポート_5

必要以上に参照していないかを確認するのにつかえそうです。

エクスポートしたログ

共有ボタンからこれらの生ログをNDJSON形式でエクスポート可能です。
概ね画面に表示されている項目のそのままですが、domainOwnerやinitiatedType(接続を開始したのがアプリ起因であるかユーザ起因であるか)のような細かい情報も記録されています。

データ例:

{"accessor":{"identifier":"com.apple.mobilemail","identifierType":"bundleID"},"category":"contacts","identifier":"B77C5048-4492-4408-99D1-9E2187ED8124","kind":"intervalBegin","timeStamp":"2021-12-27T19:39:44.032+09:00","type":"access"}
{"accessor":{"identifier":"com.apple.mobilemail","identifierType":"bundleID"},"category":"contacts","identifier":"B77C5048-4492-4408-99D1-9E2187ED8124","kind":"intervalEnd","timeStamp":"2021-12-27T19:40:29.023+09:00","type":"access"}
{"accessor":{"identifier":"otoshimono.com.lost.mamorio","identifierType":"bundleID"},"category":"location","identifier":"2E581E8A-FD8D-4735-9763-DD61B20601BD","kind":"intervalBegin","timeStamp":"2021-12-27T19:40:32.791+09:00","type":"access"}
{"accessor":{"identifier":"otoshimono.com.lost.mamorio","identifierType":"bundleID"},"category":"location","identifier":"2E581E8A-FD8D-4735-9763-DD61B20601BD","kind":"intervalEnd","timeStamp":"2021-12-27T19:40:54.807+09:00","type":"access"}
{"timeStamp":"2021-12-27T19:38:52.532+09:00","initiatedType":"AppInitiated","context":"","domain":"yt3.ggpht.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:52.532+09:00","bundleID":"com.google.ios.youtube","domainOwner":"","hits":1,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:56.128+09:00","initiatedType":"AppInitiated","context":"","domain":"lh5.googleusercontent.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:56.128+09:00","bundleID":"com.google.ios.youtube","domainOwner":"","hits":1,"domainClassification":1}
{"timeStamp":"2021-12-27T19:39:50.557+09:00","initiatedType":"NonAppInitiated","context":"","domain":"p24-contacts.icloud.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:39:49.534+09:00","bundleID":"com.apple.MobileAddressBook","domainOwner":"","hits":5,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:58.532+09:00","initiatedType":"AppInitiated","context":"","domain":"is4-ssl.mzstatic.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:58.531+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":6,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:57.332+09:00","initiatedType":"AppInitiated","context":"","domain":"amp-api.apps.apple.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:57.332+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":1,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:58.533+09:00","initiatedType":"AppInitiated","context":"","domain":"is1-ssl.mzstatic.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:58.532+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":1,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:58.532+09:00","initiatedType":"AppInitiated","context":"","domain":"is5-ssl.mzstatic.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:58.531+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":6,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:57.332+09:00","initiatedType":"AppInitiated","context":"","domain":"ocsp2.apple.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:57.332+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":1,"domainClassification":1}
{"timeStamp":"2021-12-27T19:38:58.531+09:00","initiatedType":"AppInitiated","context":"","domain":"is3-ssl.mzstatic.com","contextVerificationType":0,"type":"networkActivity","domainType":2,"firstTimeStamp":"2021-12-27T19:38:58.530+09:00","bundleID":"com.apple.AppStore","domainOwner":"","hits":6,"domainClassification":1}

雑感

この機能は今はデフォルトでオフになっているようですが、表からは見えない部分についても行儀よくしておかないとすぐにわかってしまいますね。
これまで以上にアクセス先エンドポイントなどの情報はユーザに知られても問題ないよう設計しておく必要がありそうです。

以上です。

6
1
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
6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?