# Check this app against App Store Review Guideline 5.1.2: Data Use and Sharing

Tracking across apps needs the App Tracking Transparency prompt first.

Go through this codebase for each problem below. For each one that applies, fix it on a new git branch with the steps for this app's stack (React Native and Expo, Swift, or Flutter). If none apply, say so and why.

## AppsFlyer without the App Tracking Transparency prompt

Usually a rejection.

**What Apple wants:** AppsFlyer can link data across apps for ads or measurement. Apple requires the App Tracking Transparency prompt before that happens (Guideline 5.1.2), and your App Privacy answers must match. Apps that track without asking are rejected.

**How to fix it:** Ask with App Tracking Transparency before these SDKs start, or configure them not to track.

Steps for React Native and Expo:

1. Use expo-tracking-transparency (or react-native-tracking-transparency) to ask before initializing the SDKs, and add NSUserTrackingUsageDescription.
2. Start the SDKs in limited mode, or not at all, when permission is denied.
3. Make the App Privacy answers in App Store Connect match ("Data used to track you").

Steps for Swift:

1. Call ATTrackingManager.requestTrackingAuthorization before initializing the SDKs, and add NSUserTrackingUsageDescription.
2. Start the SDKs in limited mode, or not at all, when permission is denied.
3. Make the App Privacy answers in App Store Connect match ("Data used to track you").

Steps for Flutter:

1. Call AppTrackingTransparency.requestTrackingAuthorization() (app_tracking_transparency) before initializing the SDKs, and add NSUserTrackingUsageDescription to ios/Runner/Info.plist.
2. Start the SDKs in limited mode, or not at all, when permission is denied.
3. Make the App Privacy answers in App Store Connect match ("Data used to track you").

## A tracking purpose string ships, but the app says it doesn't track

Often a rejection.

**What Apple wants:** The build has NSUserTrackingUsageDescription, yet the code never shows the tracking prompt, no SDK in the project tracks, and the privacy manifest says the app doesn't track. App Store Connect treats an app with that string as one that tracks, reviewers then look for the prompt, and a leftover string has been rejected under Guideline 5.1.2 and 2.5.1.

**How to fix it:** Remove the tracking purpose string.

Steps for React Native and Expo:

1. Remove NSUserTrackingUsageDescription from app.json under expo.ios.infoPlist (or the SDK's config plugin options), and the tracking plugin option that adds it, from every target and from any localized InfoPlist.strings.
2. Check that the App Privacy answers in App Store Connect say the app doesn't track.
3. If the app does track after all, keep the string, show the tracking prompt before any tracking starts, and set NSPrivacyTracking to true.

Steps for Swift:

1. Remove NSUserTrackingUsageDescription from the target's Info tab in Xcode, from every target and from any localized InfoPlist.strings.
2. Check that the App Privacy answers in App Store Connect say the app doesn't track.
3. If the app does track after all, keep the string, show the tracking prompt before any tracking starts, and set NSPrivacyTracking to true.

Steps for Flutter:

1. Remove NSUserTrackingUsageDescription from ios/Runner/Info.plist, from every target and from any localized InfoPlist.strings.
2. Check that the App Privacy answers in App Store Connect say the app doesn't track.
3. If the app does track after all, keep the string, show the tracking prompt before any tracking starts, and set NSPrivacyTracking to true.

## Ad and attribution SDKs track, but the privacy manifest says the app doesn't

Often a rejection.

**What Apple wants:** These SDKs link data across apps for ads or measurement by default, which Apple counts as tracking. The app's privacy manifest sets NSPrivacyTracking to false, so the manifest, the App Privacy label and what the app does disagree, and Guideline 5.1.2 asks them to match.

**How to fix it:** Declare the tracking and ask for it first, or set the SDKs up so they don't track.

Steps for React Native and Expo:

1. In the app's privacy manifest (app.json under expo.ios.privacyManifests), set NSPrivacyTracking to true and list the domains these SDKs track with under NSPrivacyTrackingDomains.
2. Show the App Tracking Transparency prompt before these SDKs start, and start them without tracking when the person says no.
3. Or, when only their non-tracking features are needed, turn tracking off in each SDK's own settings and keep NSPrivacyTracking false.
4. Make the App Privacy answers in App Store Connect say the same.

Steps for Swift and Flutter:

1. In the app's privacy manifest (PrivacyInfo.xcprivacy), set NSPrivacyTracking to true and list the domains these SDKs track with under NSPrivacyTrackingDomains.
2. Show the App Tracking Transparency prompt before these SDKs start, and start them without tracking when the person says no.
3. Or, when only their non-tracking features are needed, turn tracking off in each SDK's own settings and keep NSPrivacyTracking false.
4. Make the App Privacy answers in App Store Connect say the same.

## A tracking domain is written as an address

Often a rejection.

**What Apple wants:** NSPrivacyTrackingDomains takes host names only (tracker.example.com), not addresses with https:// or a path: iOS matches host names, so these entries block nothing.

**How to fix it:** Write each domain as a host name only.

Steps for React Native and Expo:

1. In app.json under expo.ios.privacyManifests, fix NSPrivacyTracking and NSPrivacyTrackingDomains as described.
2. Make the App Privacy answers in App Store Connect say the same about tracking.

Steps for Swift and Flutter:

1. In PrivacyInfo.xcprivacy (open it in Xcode, or as text), fix NSPrivacyTracking and NSPrivacyTrackingDomains as described.
2. Make the App Privacy answers in App Store Connect say the same about tracking.

## App Privacy leaves out undefined

Often a rejection.

**What Apple wants:** Your code collects undefined (undefined), and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app and its SDKs collect (Guideline 5.1.2), and a label that leaves data out is one of the common privacy rejections.

**How to fix it:** Add undefined in App Store Connect → App Privacy with its purposes, then publish.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick undefined, then answer its purposes, whether it's linked to the person.
2. Press Publish: App Store Connect uses the published answers.
3. Or, if the app no longer collects it, remove the code that sends it, then scan again.
4. Store setup → Privacy can draft every answer from your code and have Claude in Chrome type them in.

## App Privacy says nothing is used to track you, but the app tracks

Usually a rejection.

**What Apple wants:** Your code tracks people (undefined), yet App Privacy in App Store Connect lists nothing under "Data Used to Track You". Apple rejects a label that hides tracking (Guideline 5.1.2), and an app that shows the tracking prompt must say what it tracks with.

**How to fix it:** Mark the data used for tracking (often Device ID and Advertising Data) as "used for tracking" in App Store Connect → App Privacy, then publish.

Steps:

1. App Store Connect → App Privacy → open each data type the ad and attribution SDKs collect and answer Yes to "used for tracking".
2. Press Publish.
3. Or, if the app doesn't track any more, remove the tracking SDKs and the tracking prompt, then scan again.

## App Privacy says the app tracks with undefined, but nothing in it tracks

Delays review.

**What Apple wants:** App Privacy marks undefined as used for tracking, and nothing in the code tracks (no ad or attribution SDK, no tracking prompt). Reviewers then look for the tracking prompt and reject a build without it (Guideline 5.1.2).

**How to fix it:** Answer No to tracking for undefined in App Store Connect → App Privacy, then publish.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: open undefined and answer No to tracking.
2. Press Publish.

## App Privacy may leave out Precise Location

Often a rejection.

**What Apple wants:** The code seems to send Precise Location to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Precise Location in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Precise Location, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Photos or Videos

Often a rejection.

**What Apple wants:** The code seems to send Photos or Videos to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Photos or Videos in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Photos or Videos, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Contacts

Often a rejection.

**What Apple wants:** The code seems to send Contacts to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Contacts in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Contacts, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Health

Often a rejection.

**What Apple wants:** The code seems to send Health to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Health in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Health, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Audio Data

Often a rejection.

**What Apple wants:** The code seems to send Audio Data to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Audio Data in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Audio Data, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Email Address

Often a rejection.

**What Apple wants:** The code seems to send Email Address to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Email Address in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Email Address, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Name

Often a rejection.

**What Apple wants:** The code seems to send Name to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Name in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Name, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## App Privacy may leave out Phone Number

Often a rejection.

**What Apple wants:** The code seems to send Phone Number to a server and keep it, and App Privacy in App Store Connect doesn't list it. Reviewers compare the answers with what the app sends (Guideline 5.1.2).

**How to fix it:** Add Phone Number in App Store Connect → App Privacy with its purposes, then publish; or keep it on the device.

Steps:

1. App Store Connect → App Privacy → Edit next to Data Types: tick Phone Number, then answer its purposes and whether it's linked to the person.
2. Press Publish.
3. Data used only on the device, or only to answer a request at once (a map search), needs no answer.

## A tracking purpose string may ship without a tracking prompt

Often a rejection.

**What Apple wants:** With NSUserTrackingUsageDescription in the build, App Store Connect treats the app as one that tracks, and reviewers look for the tracking prompt. When they can't find it, they reject the app under Guideline 5.1.2; a leftover string has also been rejected under 2.5.1.

**How to fix it:** Remove the tracking purpose string, or show the tracking prompt before any tracking starts.

Steps:

1. If the app doesn't track, remove NSUserTrackingUsageDescription from Info.plist (and the plugin option that adds it), from every target and from localized InfoPlist.strings.
2. Update App Privacy in App Store Connect so it says the app doesn't track.
3. If it does track, ask with the App Tracking Transparency prompt before starting the tracking SDKs.

## Web pages in the app may set tracking cookies without asking

Often a rejection.

**What Apple wants:** Apple counts tracking or marketing cookies in web content you own as tracking. Reviewers have rejected apps that show such content without the App Tracking Transparency prompt, or keep the cookies after people decline, under Guideline 5.1.2.

**How to fix it:** Ask for tracking permission before tracking cookies are set, or turn those cookies off inside the app.

Steps:

1. Turn off analytics and ad cookies on pages shown inside the app, for example with a flag your site checks.
2. If you need them, request App Tracking Transparency first and set them only when allowed.
3. Make the cookie banner say people aren't tracked when they aren't.

---

AppScend checks an app against every guideline at once, on the developer's Mac: `npx appscend scan --json` in the app's root folder (docs: https://appscend.ai/docs).

Source: https://appscend.ai/guidelines/5-1-2
