JSPatch
JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.
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.
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.
Where it fits
- Push a critical bug fix to a shipped iOS app immediately without waiting for App Store review approval
- Override a buggy Objective-C method with a corrected JavaScript version that downloads at runtime
- Study how the JavaScript-to-Objective-C runtime bridge works for iOS dynamic code execution