Add a proxy object in JS that can call any object/methods from Objective-C and/or Java, with the ability call callbacks to JS.
This can be done since Obective-C and Java have reflection.
eg:
var proxy = JSToObjectiveC.createProxy("FBConnect", "initWithArg1:arg2:arg3:",arg1, arg2, arg3 );
proxy.create(arg); // create is a method for FBConnect
// or
proxy.call("create", arg);
eg2 (with callbacks):
// The correct type of the arguments could be obtained by reflection
var proxy = JSToObjectiveC.createProxy("FBConnect", "initWithCallback:", myCallback);
var myCallback = function() {
// to be called from Objective-C
}
Add a proxy object in JS that can call any object/methods from Objective-C and/or Java, with the ability call callbacks to JS. This can be done since Obective-C and Java have reflection.
eg:
eg2 (with callbacks):