Where the scanner looks in an Expo project
stringer-preflight parses app.json (the expo object) and reads app.config.js / app.config.ts as text. If you have run expo prebuild or use the bare workflow, it also reads ios/<App>/Info.plist, PrivacyInfo.xcprivacy and the entitlements file. JavaScript and TypeScript under node_modules are skipped; your own .ts, .tsx and .js files are scanned with __DEV__ branches removed.
npx skills add komako-workshop/stringers # then: "preflight this app for App Store review"
stringer-preflight . --strict # or run the scanner yourself from the project root1. Purpose strings: ios.infoPlist and config plugins
iOS terminates the app the moment it touches the camera, photo library or location without the matching NS…UsageDescription key, and App Review rejects under Guideline 5.1.1. Rules IOS-PLIST-001 to IOS-PLIST-004 check that every capability your code uses has its key; IOS-PLIST-005 rejects strings that are empty, placeholders or under 16 characters.
In Expo there are two ways to set a key. A config plugin writes it during prebuild, and the scanner counts these plugins as providing these keys:
Config plugin in plugins | Keys the scanner counts as set |
|---|---|
expo-camera | NSCameraUsageDescription, NSMicrophoneUsageDescription |
react-native-vision-camera | NSCameraUsageDescription |
expo-image-picker | NSCameraUsageDescription, NSPhotoLibraryUsageDescription, NSMicrophoneUsageDescription |
expo-media-library | NSPhotoLibraryUsageDescription, NSPhotoLibraryAddUsageDescription |
expo-location | NSLocationWhenInUseUsageDescription |
expo-contacts | NSContactsUsageDescription |
expo-local-authentication | NSFaceIDUsageDescription |
expo-tracking-transparency | NSUserTrackingUsageDescription |
expo-calendar | NSCalendarsUsageDescription, NSRemindersUsageDescription |
expo-av | NSMicrophoneUsageDescription |
expo-audio | NSMicrophoneUsageDescription |
A plugin's default sentence is generic ("Allow $(PRODUCT_NAME) to access your camera"), and generic strings are a classic 5.1.1 rejection. Pass your own text in the plugin options, or set the key explicitly in ios.infoPlist:
{
"expo": {
"plugins": [
["expo-camera", { "cameraPermission": "Scan a receipt to add its line items to your budget." }],
["expo-image-picker", { "photosPermission": "Choose a profile photo from your library." }],
["expo-location", { "locationWhenInUsePermission": "Show running routes near you on the map." }]
],
"ios": {
"infoPlist": {
"NSMicrophoneUsageDescription": "Record a voice note to attach to a journal entry.",
"NSFaceIDUsageDescription": "Unlock your private journal with Face ID."
}
}
}
}A good purpose string says what the data is used for in this app, in one full sentence. Installing a library you do not use is also a risk: the binary references the API, Apple emails you about a missing purpose string, and you end up writing a justification for a feature that does not exist. Remove the package instead.
2. Privacy manifest: ios.privacyManifests
React Native itself and most storage libraries call Required Reason APIs. AsyncStorage is UserDefaults underneath; the React Native runtime reads file timestamps and system boot time. Without a declaration the upload is answered with ITMS-91053, which is rule IOS-PRIV-001. In Expo the manifest is a JSON block; prebuild turns it into PrivacyInfo.xcprivacy:
{
"expo": {
"ios": {
"privacyManifests": {
"NSPrivacyAccessedAPITypes": [
{
"NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategoryUserDefaults",
"NSPrivacyAccessedAPITypeReasons": ["CA92.1"]
},
{
"NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategoryFileTimestamp",
"NSPrivacyAccessedAPITypeReasons": ["C617.1"]
},
{
"NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategorySystemBootTime",
"NSPrivacyAccessedAPITypeReasons": ["35F9.1"]
}
]
}
}
}
}CA92.1 covers reading and writing your own app's defaults, C617.1 covers timestamps of files inside your container, 35F9.1 covers measuring elapsed time. Add NSPrivacyAccessedAPICategoryDiskSpace with E174.1 if you check free space before a download. The full code table is in the PrivacyInfo.xcprivacy reference.
3. Export compliance: usesNonExemptEncryption
If ITSAppUsesNonExemptEncryption is not declared, every build waits in "Missing Compliance" until someone answers the export question by hand (IOS-PLIST-006). An app that only uses HTTPS and Apple's own crypto is exempt:
{ "expo": { "ios": { "config": { "usesNonExemptEncryption": false } } } }4. Purchases: RevenueCat, expo-iap, react-native-iap
Guideline 3.1.1 requires a restore mechanism for restorable purchases, and reviewers look for the button. IOS-IAP-001 fires when the project contains purchase code but no restore call. With RevenueCat:
import Purchases from 'react-native-purchases';
export async function restorePurchases() {
const info = await Purchases.restorePurchases();
return info.entitlements.active['pro'] !== undefined;
}
// On the paywall: <Button title="Restore Purchases" onPress={restorePurchases} />With expo-iap or react-native-iap, restoring means calling getAvailablePurchases() and re-granting entitlements. Wrap it in a function named restorePurchases and wire it to a visible button; the scanner recognizes that name, and so will the next developer.
Three more traps:
IOS-IAP-002(Guideline 3.1.2): the paywall must link to your Terms of Use (EULA) and Privacy Policy. If a RevenueCat dashboard paywall renders them, the links are not in your source; add them to your own settings screen as well, or silence the rule with a comment once you have verified the rendered paywall.IOS-IAP-003(Guideline 3.1.1):@stripe/stripe-react-nativewith no In-App Purchase code is flagged. Stripe is correct for physical goods and real-world services; digital content and subscriptions must use In-App Purchase.- Products not attached to the build: the first subscription must be submitted together with an app version in App Store Connect. A scanner cannot see that; a reviewer who taps Subscribe and gets an error rejects under 2.1.
5. Accounts: deletion and Sign in with Apple
If the app calls supabase.auth.signUp(, createUserWithEmailAndPassword or any signUp(, Guideline 5.1.1(v) requires in-app account deletion and IOS-AUTH-002 checks for it. Deleting a Supabase or Firebase user needs server privileges, so the client calls a function:
export async function deleteAccount() {
const { error } = await supabase.functions.invoke('delete-account');
if (error) throw error;
await supabase.auth.signOut();
}If you offer Google or Facebook login (@react-native-google-signin/google-signin, react-native-fbsdk-next), Guideline 4.8 requires an equivalent privacy-preserving option, in practice Sign in with Apple (IOS-AUTH-001):
{ "expo": { "ios": { "usesAppleSignIn": true }, "plugins": ["expo-apple-authentication"] } }import * as AppleAuthentication from 'expo-apple-authentication';
const credential = await AppleAuthentication.signInAsync({
requestedScopes: [
AppleAuthentication.AppleAuthenticationScope.FULL_NAME,
AppleAuthentication.AppleAuthenticationScope.EMAIL,
],
});Both flows, including Apple token revocation, are covered step by step in the account deletion and Sign in with Apple guide.
6. Build hygiene before eas submit
- Dev hosts (
IOS-BUILD-001):http://localhost:3000,10.0.2.2or an ngrok URL as the API base makes the app look broken to a reviewer. Keep them insideif (__DEV__), or read the base URL from an EAS environment per build profile. - Secrets (
IOS-BUILD-002): anything prefixedEXPO_PUBLIC_is inlined into the JavaScript bundle, and so is a literalsk-proj-…orsk_live_…key. Revoke it, then call the provider from your own backend. - Plain HTTP (
IOS-BUILD-005,IOS-PLIST-007): usehttps://. Do not shipNSAllowsArbitraryLoads: trueinios.infoPlist; add anNSExceptionDomainsentry for the one host that needs it. - Bypass flags (
IOS-BUILD-003):const bypassPaywall = trueleft over from testing ships to production unless it is tied to__DEV__. - iPad:
"supportsTablet": truemeans the app is reviewed on an iPad and needs iPad screenshots. If the layout was never tested there, set it tofalsebefore the first release; iPad support cannot be removed after the app has shipped with it. - Build numbers: set
"appVersionSource": "remote"undercliand"autoIncrement": truein the production profile ofeas.json, so a resubmission after a rejection does not fail on a duplicate build number.
To make it impossible to forget, install the pre-submit hook from the full checklist: it runs the scan whenever an agent is about to run eas submit and blocks while blockers remain.