bang590 / 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.
MIT License
11.36k stars 2.24k forks source link

crash when called method like 'vs_method:a:' #181

Closed starFelix closed 8 years ago

starFelix commented 8 years ago

The method write by Objective-C like below: @interface UIAlertView(category)

At runtime,this js method will cover to 'vs:method: a:' which is error.

bang590 commented 8 years ago

https://github.com/bang590/JSPatch/wiki/Base-usage#2-invoking-method Use _ to represent in the original Obj-C method name:

// Obj-C: [JPObject _privateMethod];
JPObject.__privateMethod()