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];

Reference articles:

Subsequent callbacks from a Cordova iOS plugin don't fire

上一篇 下一篇

猜你喜欢

热点阅读