Guideline 2.5.2
Guideline 2.5.2 - Software Requirements: Code Injection or Hot-Patching
Our Take
Apple is rejecting your app because it downloads and executes code that was not included in the original binary submitted for review. This covers JavaScript-to-native bridges that execute arbitrary native code, hot-patching frameworks like JSPatch or Rollout, and any mechanism that can modify the app's native behavior after Apple has approved it. This is one of Apple's hardest lines. The reasoning is straightforward: Apple reviews a specific binary and approves it. If the app can download code that changes its behavior after approval, Apple's review is meaningless. This guideline was created largely in response to JSPatch, which was widely used in the Chinese developer community to push native code changes without going through App Store review. Important nuance: JavaScriptCore and WKWebView can execute JavaScript, and that's fine -- Apple's concern is specifically about JavaScript (or any other code) that bridges to native APIs in ways that weren't present in the reviewed binary. React Native and similar frameworks are generally acceptable because the JavaScript they execute interacts with a fixed set of native bridges that were reviewed. But dynamically downloading new native bridge code is not acceptable.
Resolution Guide
Remove hot-patching frameworks
If you're using JSPatch, Rollout, or any similar SDK, remove it entirely from your project. There is no compliant way to use these.
Audit dynamic code loading
Search your codebase for: NSClassFromString, performSelector, dlopen, dlsym, objc_msgSend with dynamic selectors, and any code that evaluates strings as code (eval() equivalents).
Bundle all JavaScript locally
If you use JavaScriptCore or any embedded JavaScript, all scripts must be bundled with the app binary. They cannot be downloaded from a server. Use CodePush or similar OTA update systems with extreme caution -- Apple allows updating JavaScript bundles only if the updates don't change the app's primary purpose or create a 'store within a store.'
Check third-party SDKs
Some analytics, A/B testing, or feature flagging SDKs use code injection internally. Audit them and replace any that download executable code.
Document your architecture
In review notes, explain how your app uses JavaScript (if applicable) and confirm that all code was included in the submitted binary.
Prevention
Example Rejection Email
Consider Appealing
If your app uses React Native, Flutter, or a similar cross-platform framework and Apple flagged it incorrectly, explain that the JavaScript/Dart code interacts only with a fixed set of native bridges that were included in the reviewed binary. Provide documentation of your framework's architecture.
Before & After
App includes JSPatch framework that downloads JavaScript patches from a server and converts them to native Objective-C method calls at runtime
JSPatch completely removed. All bug fixes and updates are delivered through standard App Store review process. JavaScript used only in bundled WKWebView content.
What changed: There is no compliant version of hot-patching native code. The only path forward is complete removal and committing to the App Store update process.
Community Solutions · 0
Sign in to share your solution.
More Guideline 2 (Performance) rejections
- Guideline 2.1 - App Completeness: App Crashes During Review
- Guideline 2.1 - App Completeness: App Requires External Hardware Not Provided for Review
- Guideline 2.1 - App Completeness: Crashes on Launch
- Guideline 2.1 - App Completeness: Demo Account Not Working
- Guideline 2.1 - App Completeness: IAP Products Not Found in Binary
- Guideline 2.1 - App Completeness: Missing App Icon