Native callback Javascript many
2017-12-18 本文已影响18人
南国青天
How to keep callback in Cordova?
The Code:
CDVPluginResult* pluginResult = [sendPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:key];
[pluginResult setKeepCallbackAsBool:YES]; // here we tell Cordova not to cleanup the callback id after sendPluginResult()
[self.commandDelegate sendPluginResult:pluginResult callbackId:monitoredRegions.callbackId];