Open5

Apple Privacy Manifest (Flutter)

Ryuku KimuraRyuku Kimura

WHY

WHAT

Xcode15 のサポート

  • PrivacyInfo.xcprivacyの取り扱いに対応するため

使用している package の repository を虱潰しに確認していく (pubspec.yaml)

  1. repository にiosdarwinがないか確認(iOSのコード.swift等を使ってるか) → なければそのプラグインは対応不要
  2. 1でiOSのコードを使ってる場合、PrivacyInfo.xcprivacyがあるか確認 → あったら対応済みなので最新版まで上げる
  3. 2でPrivacyInfo.xcprivacyがない場合はリポジトリ内の issue を漁る → 検討されているか
  4. 3で issue が立ってなければ早めに issue を立てたほうがよさそう
  5. 2, 3でプラグイン側の対応が進まなければ、別のプラグインの検討が必要

Flutter の最新化

Ryuku KimuraRyuku Kimura

repository の .swift について

  • package には /lib/exampleで path が分かれており基本は/libにあるコードを使ってる
  • 今回は/exampleにある.swiftは無視する
Ryuku KimuraRyuku Kimura

空の PrivacyInfo.xcprivacy は追加しなくていい

  • apple からの回答によると、ドキュメントに該当しない場合はあえて空の PrivacyInfo.xcprivacy を追加する必要はないそう
Ryuku KimuraRyuku Kimura

Privacy Manifest に対応する

PrivacyInfo.xcprivacy の作成

  • Xcode15 を開く
  • Runner.xcodeproj を開く
  • File > New > File... から App Privacy を選択し next
  • Target に☑️をつけて create
  • 左のナビゲーションに PrivacyInfo が追加されるので必要な設定を行う

必要な設定を洗い出す

  • ~Appleの説明によると iOS, iPadOS に出してるアプリに関しては NSPrivacyAccessedAPITypes だけ設定すればいいっぽいが、念のため概要だけ理解しておく~
    • 2024/04/25 確認したら以下の note は削除されていた 🧐
Note
You only need to supply NSPrivacyAccessedAPITypes for apps and third-party SDKs on iOS, iPadOS, tvOS, visionOS, and watchOS.
  • 以下の4つから必要な項目のみ追加
    • NSPrivacyTracking
      • App Tracking Transparency (ATT) が実装されてる場合は追加
    • NSPrivacyTrackingDomains
      • ↑が YES の場合は追加
    • NSPrivacyCollectedDataTypes(Privacy Nutrition Label Types)
    • NSPrivacyAccessedAPITypes

NSPrivacyAccessedAPITypes の設定

  • 以下の中から使用しているAPIと理由を選択する
  • 理由は以下から選択
    • 35F9.1: Measure time on-device, per documentation
    • 3B52.1: Files provided to app by user, per documentation
    • 3EC4.1: Custom keyboard app on-device, per documentation
    • 54BD.1: Customize UI on-device, per documentation
    • 85F4.1: Display to user on-device, per documentation
    • C617.1: Inside app or group container, per documentation
    • CA92.1: Access info from same app, per documentation
    • DDA9.1: Display to user on-device, per documentation
    • E174.1: Write or delete file on-device, per documentation
    • ドキュメントを見ると上記以外もあるが、その場合はプルダウンではなく手動で入力するぽい

PrivacyInfo.xcprivacy を追加しなくていいかもしれないパターン

ITMS-91053: Missing API declaration - Your app’s code in the “Runner” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

ref: https://zenn.dev/omatsu/articles/6f2e63976141987108d6

  • あとは実際に提出してみて、リジェクトされたり、メールがきたら都度対応するしかない
Ryuku KimuraRyuku Kimura

警告来てない人は対応不要だった説

  • RxSwift の issue で議論が白熱したところに、直近で警告が来てないアプリを 5/1 以降すぐにリジェクトすることはないという Apple からの回答を得たとコメントされている
  • 序盤から Apple に直接問い合わせるという方法を取るべきだったかもしれない