explaingit

bang590/jspatch

11,338Objective-CAudience · developerComplexity · 3/5Setup · hard

TLDR

JSPatch is an iOS development tool that lets you push JavaScript hotfixes to a live app at runtime, bypassing the App Store review wait, though Apple now restricts direct use and recommends the official JSPatch platform instead.

Mindmap

mindmap
  root((jspatch))
    What it does
      iOS hotfixing
      Runtime patching
      Skip App Store review
    How it works
      JavaScript to ObjC bridge
      Runtime method override
      Downloaded patch files
    Status
      No active development
      Apple restrictions apply
      Use official platform
    Setup
      iOS 6 or later
      CocoaPods install
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Push a critical bug fix to a shipped iOS app immediately without waiting for App Store review approval

USE CASE 2

Override a buggy Objective-C method with a corrected JavaScript version that downloads at runtime

USE CASE 3

Study how the JavaScript-to-Objective-C runtime bridge works for iOS dynamic code execution

Tech stack

Objective-CJavaScriptiOSCocoaPods

Getting it running

Difficulty · hard Time to first run · 1h+

Apple now restricts dynamic code execution on the App Store, direct integration may cause app rejection, the official JSPatch platform is recommended instead.

In plain English

JSPatch is a tool for iOS app developers that lets them update a live app's behavior without submitting a new version to the App Store. Normally, any bug fix or feature change in an iOS app requires publishing an update through Apple's review process, which can take days. JSPatch sidesteps that by letting developers write fixes in JavaScript that are downloaded at runtime and applied on the fly. Technically, it works by bridging JavaScript and Objective-C (the traditional programming language for iOS apps) through a low-level iOS feature called the Objective-C runtime. With JSPatch embedded in an app, a developer can push a small JavaScript file to users' devices that overrides existing app methods, adds new behaviors, or fixes bugs without touching the original compiled code. The README includes code examples showing how to replace a buggy method with a corrected JavaScript version. The main use case described is "hotfixing": patching a critical bug in a shipped iOS app immediately, before a full update can be approved through App Store review. The tool was widely used in Chinese iOS apps. An important notice is included in the README: Apple has restricted apps that use dynamic code execution on the App Store, and self-integrating JSPatch directly can lead to app rejection. The README recommends using the official JSPatch platform, a separately maintained service that wraps the engine in a controlled environment, rather than embedding the open-source engine on your own. The project does not appear to be under active development, but the code remains available. It requires iOS 6.0 or later and can be added to a project via CocoaPods, a dependency manager common in iOS development.

Copy-paste prompts

Prompt 1
Using JSPatch, show me how to write a JavaScript hotfix that overrides a buggy Objective-C method called 'loadUserData' in 'UserViewController'. What does the JS file look like and how does JSPatch apply it?
Prompt 2
Explain how the JSPatch Objective-C runtime bridge works at a technical level, how does a JavaScript file get interpreted and turned into actual iOS app behavior at runtime?
Prompt 3
I want to add JSPatch to an iOS app via CocoaPods. Write the Podfile entry and show me the minimal Swift or Objective-C setup code to download a JavaScript patch file from a server and apply it.
Open on GitHub → Explain another repo

← bang590 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.