# Check this app against App Store Review Guideline 4.0: Design

Apps must meet Apple's baseline design standards and interface conventions, and keep working well after approval.

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 layout breaks on iPad

Often a rejection.

**What Apple wants:** undefined Layouts that run off the screen or crowd on iPad are a common rejection under Guidelines 2.1 and 4.0.

**How to fix it:** Make the screens adapt to the iPad's width (or support iPhone only).

Steps:

1. Check the screen named on this card on an iPad simulator.
2. Use flexible widths, or limit content width on large screens.

## Text gets hard to read in dark mode

Often a rejection.

**What Apple wants:** undefined Many people keep dark mode on, and reviewers can switch it on too. Text that reads well in light mode but goes faint in dark mode looks broken, which Apple can reject under Guideline 4.0 (Design).

**How to fix it:** Use colors that change with dark mode for text and backgrounds.

Steps for React Native and Expo:

1. On the screens named here, pick text and background colors by the color scheme (useColorScheme) instead of fixed black or white.
2. Check the screens with the Simulator in dark mode, then run the test again with Dark mode ticked.

Steps for Swift:

1. On the screens named here, replace fixed black or white text and background colors with system colors (label, systemBackground) or asset catalog colors that have a dark appearance.
2. Check the screens with the Simulator in dark mode, then run the test again with Dark mode ticked.

Steps for Flutter:

1. Set darkTheme on MaterialApp and take text and background colors from Theme.of(context) instead of fixed ones.
2. Check the screens with the Simulator in dark mode, then run the test again with Dark mode ticked.

## The app may ask for name or email again after Sign in with Apple

Usually a rejection.

**What Apple wants:** Sign in with Apple already gives the app a name and an email. Reviewers reject apps that make people enter them again afterwards (Guideline 4.0, Design).

**How to fix it:** Use the name and email from Sign in with Apple, and drop the extra required step.

Steps:

1. Save the name and email from the Apple credential on the first sign-in (Apple sends the name only once).
2. Remove the required name or email step for people who signed in with Apple, or make it optional.

## Sign-in may send people out of the app to Safari

Usually a rejection.

**What Apple wants:** Reviewers reject apps that switch to Safari to sign in or register, as a poor experience (Guideline 4.0, Design). They expect it in the app or in an in-app browser sheet.

**How to fix it:** Keep sign-in in the app, or open it in an in-app authentication sheet.

Steps for React Native, Expo and Flutter:

1. Replace the jump to Safari with a native sign-in screen, or an in-app authentication session (expo-web-browser's auth session in Expo).
2. Bring people back into the app automatically once they are signed in.

Steps for Swift:

1. Replace the jump to Safari with a native sign-in screen, or an in-app authentication session with ASWebAuthenticationSession.
2. Bring people back into the app automatically once they are signed in.

## The Sign in with Apple button may not meet Apple's design rules

Often a rejection.

**What Apple wants:** Apple has strict rules for how its sign-in button looks and reads. Reviewers reject homemade buttons that get the logo, wording or style wrong (Guideline 4.0, Design).

**How to fix it:** Use Apple's system Sign in with Apple button.

Steps:

1. Replace the custom button with Apple's button component, in the black, white or outlined style.
2. Make it at least as large and visible as the other sign-in buttons.

## Text may be unreadable when the device is in Dark Mode

Often a rejection.

**What Apple wants:** Reviewers may test with Dark Mode on. Screens where text fades into the background have been rejected under Guideline 4.0 as hard-to-read typography, even when they look fine in Light Mode.

**How to fix it:** Make text and background colors adapt together, or lock the app to one appearance.

Steps for React Native, Expo and Flutter:

1. Use paired colors for text and backgrounds, from a theme built on useColorScheme.
2. Or force one appearance: userInterfaceStyle in Expo's app config (UIUserInterfaceStyle in Info.plist without Expo).
3. Check every screen in Dark Mode in the Simulator.

Steps for Swift:

1. Use semantic colors, or asset catalog colors with a dark variant, for text and backgrounds.
2. Or force one appearance with UIUserInterfaceStyle in Info.plist.
3. Check every screen in Dark Mode in the Simulator.

## Permission alerts may be in a different language than the app

Often a rejection.

**What Apple wants:** Reviewers read permission alerts in the language they test in. Alerts that don't match the rest of the app have been rejected under Guideline 4.0, and Apple asks for purpose strings in every language the app supports (Guideline 5.1.1).

**How to fix it:** Write the purpose strings in the app's language, with a translation for each language the app supports.

Steps for React Native, Expo and Flutter:

1. Set the main purpose strings in the app's primary language.
2. Add translations with locales in Expo's app config (InfoPlist.strings files in the iOS project without Expo).
3. Test each language in the Simulator.

Steps for Swift:

1. Set the main purpose strings in the app's primary language.
2. Add translations in an InfoPlist.xcstrings catalog (or InfoPlist.strings files) in Xcode.
3. Test each language in the Simulator.

---

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-0
