“ITMS-91053: Missing API declaration”: how to fix it
Why App Store Connect rejects your build with ITMS-91053, how to add a privacy manifest with approved reason codes, and the fix for Flutter, React Native, Expo and Unity.
You upload a build and App Store Connect emails you: “ITMS-91053: Missing API declaration - Your app’s code in the "<file>" file references one or more APIs that require reasons, including the following API categories: <category>.” The category is something like NSPrivacyAccessedAPICategoryUserDefaults or NSPrivacyAccessedAPICategoryFileTimestamp. It means code in your app, often a third-party SDK, calls an API that Apple says needs a declared reason, and no privacy manifest gives one.
Why it happens
Apple keeps a list of “required reason” APIs: calls that could be used to fingerprint a device. Any app that uses them has to say why in a privacy manifest. The email appears when:
- Your own code uses one of these APIs and the app has no privacy manifest, or the manifest leaves out that category. UserDefaults is the most common, since almost every app uses it.
- A third-party SDK uses one and ships without its own manifest. Older versions of analytics, crash reporting and plugin libraries are the usual source.
- The manifest exists but isn’t in the build. If PrivacyInfo.xcprivacy isn’t a member of the app target, Xcode doesn’t copy it into the app bundle.
- The file in the email is a static library. Statically linked code ends up inside your app’s binary. If the library ships no manifest of its own, its API use has to be declared in yours.
How to fix it
- Write down every category listed in the email. One email can name several.
- Update your SDKs and plugins first. Many now include their own manifest, and that may clear some categories without any work on your side.
- In Xcode, choose File → New File, pick App Privacy in the Resource section, tick your app target and click Create. Keep the default name, PrivacyInfo.xcprivacy.
- Add the key NSPrivacyAccessedAPITypes (an array). For each category, add a dictionary with NSPrivacyAccessedAPIType set to the category name and NSPrivacyAccessedAPITypeReasons set to an array of reason codes (see the table below).
- Pick only reasons that match what the code really does. Apple says the declared reasons must be accurate, and you may use the data only for those reasons.
- Archive and upload again. If the email comes back, check which categories it still lists.
| Category in the email | Common reason codes |
|---|---|
| NSPrivacyAccessedAPICategoryUserDefaults | CA92.1 data only your app reads and writes; 1C8F.1 shared within your App Group |
| NSPrivacyAccessedAPICategoryFileTimestamp | C617.1 files inside your app or app group container; DDA9.1 show timestamps to the user; 3B52.1 files the user picked |
| NSPrivacyAccessedAPICategorySystemBootTime | 35F9.1 measure time between in-app events or run timers |
| NSPrivacyAccessedAPICategoryDiskSpace | E174.1 check there’s room to write files; 85F4.1 show disk space to the user |
| NSPrivacyAccessedAPICategoryActiveKeyboards | 54BD.1 adapt your UI to the active keyboard; 3EC4.1 custom keyboard apps |
Where to add it in each stack
| Project type | What to do |
|---|---|
| Xcode (Swift/Objective-C) | Add PrivacyInfo.xcprivacy to the app target as above. SDKs added as frameworks or Swift packages carry their own manifest. |
| Flutter | Open ios/Runner.xcworkspace in Xcode and add the file to the Runner target. Update plugins named in the email with flutter pub upgrade. |
| React Native (bare) | Projects created from the 0.74 template already include a PrivacyInfo.xcprivacy. Add the missing categories there, or create the file in Xcode on older projects. |
| Expo | Add the entries under ios.privacyManifests in app.json, then make a new native build. Run npx expo install --fix to update libraries. |
| Unity | Create the file in Xcode and save it in Assets/Plugins. Unity 2021.3.35f1, 2022.3.18f1, 2023.2.7f1 and later already declare the engine’s own reasons. |
How to stop it happening again
When you add a new SDK, check that its release notes mention a privacy manifest. Keep your own PrivacyInfo.xcprivacy under version control, and if a code generator rebuilds your iOS folder (Expo prebuild, a new Flutter project), make sure the manifest comes back too. A manifest with unexpected keys or values is rejected as invalid, so edit it with Xcode’s property list editor.
Questions people ask
The file in the email is from an SDK, not my code. Do I still have to fix it?
Yes. Update the SDK to a version with its own manifest. If it’s statically linked and still has none, declare its use in your app’s manifest, and ask the SDK’s maker for an update.
Which reason code should I pick for UserDefaults?
For most apps it’s CA92.1: the app reads and writes data that only it can access. Use 1C8F.1 if you share defaults with extensions through an App Group.
Do I also need to fill in NSPrivacyCollectedDataTypes?
It’s a separate key in the same file for the data your app collects. ITMS-91053 is only about NSPrivacyAccessedAPITypes, but the manifest should be complete and valid.
Does this apply to macOS apps?
Apple’s required reason list covers iOS, iPadOS, tvOS, visionOS and watchOS apps.
Sources
Check your own name
Domains, both app stores, bundle IDs and every live site using the name, in under a minute.
Check a name