# Check this app against App Store Review Guideline 4.5.4: Push Notifications

Push notifications must be optional, carry no sensitive data, and be used for marketing only after an in-app opt-in with an in-app opt-out.

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.

## The app may require notifications to continue

Usually a rejection.

**What Apple wants:** Notifications have to stay optional, and the app must work when people decline (Guideline 4.5.4). Reviewers often say no to the prompt, and a blocked app gets rejected.

**How to fix it:** Let people skip or decline notifications and keep using the app.

Steps:

1. Add a "Not now" option, and continue the flow when permission is denied.
2. Ask again later only at a relevant moment, or from settings.

## Promotional notifications may go out without opt-in

Often a rejection.

**What Apple wants:** Apple allows marketing notifications only after people opt in through clear wording in the app, with a way to opt out in the app (Guideline 4.5.4). Discount pushes after a closed paywall are a common slip.

**How to fix it:** Ask for marketing consent in the app, and add a switch to turn it off.

Steps:

1. Add a clear opt-in for promotional notifications, separate from the system prompt.
2. Add a setting in the app to stop them.
3. Send discount or upgrade notifications only to people who opted in.

## Notifications may show sensitive personal data

Delays review.

**What Apple wants:** Notifications can show on a locked screen, and Apple says not to use them for sensitive or confidential details (Guideline 4.5.4).

**How to fix it:** Keep notification text general, and show the details inside the app.

Steps:

1. Replace sensitive values with a neutral line, like "You have a new result".
2. Show the details once the person opens the app.

---

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/4-5-4
