ITMS-91053: Missing API declaration - Privacy Ask Question

ITMS-91053: Missing API declaration - Privacy Ask Question

Why am I all of a sudden getting this on successful builds with Apple?

Although submission for App Store review was successful, you may want to correct the following issues in your next submission for App Store review. Once you've corrected the issues, upload a new binary to App Store Connect.

ITMS-91053: Missing API declaration - Your app’s code in the “Test” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. 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.

ITMS-91053: Missing API declaration - Your app’s code in the “Test” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. 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.

ITMS-91053: Missing API declaration - Your app’s code in the “Test” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. 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.

ITMS-91053: Missing API declaration - Your app’s code in the “Test” 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.

ベストアンサー1

This is all documented in the Apple's website. Here are the steps:

  • Create a privacy manifest file for your app:

To add the privacy manifest to your app or third-party SDK in Xcode, follow these steps: Choose File > New File.

Scroll down to the Resource section, and select App Privacy File type.

Click Next.

Check your app or third-party SDK’s target in the Targets list.

Click Create.

By default, the file is named PrivacyInfo.xcprivacy; this is the required file name for bundled privacy manifests.

  • At the top level of this property list file, add the following key to the dictionary:

    NSPrivacyAccessedAPITypes

  • Basically, the keys that you need to add have been mentioned in the Apple's email: ... you must include a NSPrivacy.... , in this link search for each of the keys mentioned in your email starting with NSPrivacy... and see what the accepted reason codes are related to your own app and add it.

You should have one item for each NSPrivacy... key under the NSPrivacyAccessedAPITypes, which each of them has only one Privacy Accessed API Type which is the key name and one Privacy Accessed API Reasons which can include one or more reason codes.

And do not forget to select target for PrivacyInfo.xcprivacy file.

ここに画像の説明を入力してください

最終的に、プライバシー マニフェスト ファイルは次のようなものになります。

キーを追加した後のプライバシー マニフェスト ファイル

参考文献:

おすすめ記事