if (ObjC.available){ 
var classname = "LoginValidate"; 
var methodname= "isLoginValidated"; 
var hook = ObjC.classes[classname][methodname]; Interceptor.attach(hook.implementation,
 { onLeave: function(retvalue) 
{ 
 newretvalue = ptr("0x1"); 
retvalue.replace(newretvalue); 
console.log("\nNewReturnValue:" + retvalue + "\"]"); } }); 
} 