# Check this app against App Store Review Guideline 2.5.2: Self-contained apps

Apps stay inside their own container and may not download or run code that adds or changes features, apart from limited coding-education cases.

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 download and run code that changes features

Usually a rejection.

**What Apple wants:** Code that adds or changes features has to ship inside the app, not arrive later from a server (Guideline 2.5.2). Changing the app after approval this way is the bait-and-switch Apple removes apps and terminates developer accounts for (Guideline 2.5.19); only HTML5 mini apps and plug-ins under Guideline 4.7 are allowed.

**How to fix it:** Ship feature code inside the app, and send data rather than code from the server.

Steps:

1. Move downloaded native code and scripts that change the app into the app bundle.
2. Use over-the-air updates for fixes only, and if the server needs to change behavior, send configuration data, not code.

## The app may install apps from outside the App Store

Usually a rejection.

**What Apple wants:** An App Store app can't be a way to install other apps or code outside the store (Guideline 2.5.2). Reviewers reject install links and sideloading guides.

**How to fix it:** Remove install links and sideloading instructions, and link to App Store pages instead.

Steps:

1. Remove itms-services and .ipa links and any sideloading instructions.
2. Link to other apps through their App Store pages.

## The app may try to use files outside its own storage

Delays review.

**What Apple wants:** Apps must stay inside their own container and may not read or write data anywhere else (Guideline 2.5.2). iOS blocks it, so the feature fails, and reviewers flag the attempt.

**How to fix it:** Keep files in the app's own folders, or share them through an App Group.

Steps:

1. Replace hard-coded system paths with FileManager locations inside the app's container (Documents, Caches, Application Support).
2. To share files with an extension, use an App Group container.

---

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