ITMS-91053: Missing API declaration

Vikram Kumar
3 min readApr 9, 2024

--

As an iOS app developer, you’ve probably come across a notable warning from Apple: ITMS-91053: Missing API Declaration.

In the world of app development, privacy is a top priority for Apple. As part of their guidelines for developers, Apple requires that you detail the use of required reason APIs in privacy manifest files. This documentation process is not only about compliance, but also a commitment to transparency and user trust.

If you’re seeing the ITMS-91053: Missing API declaration error message, it means that your app’s code references one or more APIs that require reasons, including specific API categories. In this post, we’ll explain what this error message means, how to address it, and provide a detailed guide on creating a privacy manifest file.

Photo by NEW DATA SERVICES on Unsplash

What’s Changing?

Apple is introducing stricter guidelines around app access to user data. This includes APIs (Application Programming Interfaces) that require specific explanations for their use. One such API is NSPrivacyAccessedAPICategoryDiskSpace, which allows apps to access a device’s disk space.

What is ITMS-91053: Missing API Declaration?

The ITMS-91053: Missing API declaration error message indicates that your app’s code references one or more APIs that require reasons, including specific API categories. These categories include:

  • NSPrivacyAccessedAPICategoryFileTimestamp
  • NSPrivacyAccessedAPICategorySystemBootTime
  • NSPrivacyAccessedAPICategoryUserDefaults
  • NSPrivacyAccessedAPICategoryDiskSpace
  • NSPrivacyAccessedAPICategoryFileTimestamp
  • NSPrivacyAccessedAPICategoryActiveKeyboards

When you upload an app to App Store Connect that uses a required reason API without describing the reason in its privacy manifest file, Apple sends you an email reminding you to add the reason to the app’s privacy manifest.

How to Address ITMS-91053: Missing API Declaration

To address the ITMS-91053: Missing API declaration error message, you need to add a privacy manifest file to your app or third-party SDK in Xcode. Here are the steps to follow:

  1. Create a new file in Xcode and name it PrivacyInfo.xcprivacy. This is the required file name for bundled privacy manifests.

2. Add the privacy manifest file to your target’s resources for Xcode to use it when you generate a privacy report.

3. In the PrivacyInfo.xcprivacy file, add the required reason APIs and describe their usage. For example, if you’re using the UserDefaults API, you can add the following code to the file:

<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>

4. Generate a privacy report in Xcode by selecting “Generate Privacy Report” from the context menu in Xcode Organizer for an app archive. This feature helps ensure your app meets App Store privacy requirements.

Where Can I Find More Information?

Apple’s developer documentation has everything you need to understand this update. Here, you’ll find:

  • A list of required reason APIs (like NSPrivacyAccessedAPICategoryDiskSpace).
  • Approved reasons you can use for your app’s data access.

You can access this documentation here: link to Apple’s developer documentation on describing use of required reason API: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

Conclusion

In conclusion, Apple’s new privacy guidelines may seem like an extra hurdle, but they ultimately benefit user trust and data protection. By taking some time to update your app’s privacy manifest before May 1st, you can avoid any delays in your app’s journey to the App Store. Remember, Apple’s documentation is your best friend in this process. So, get ahead of the curve, update your manifests, and keep your apps on track for a successful launch!

Happy Coding!!!

--

--

Vikram Kumar
Vikram Kumar

Written by Vikram Kumar

I am Vikram, a Senior iOS Developer at Matellio Inc. focused on writing clean and efficient code. Complex problem-solver with an analytical and driven mindset.

Responses (3)