美文网首页
Native callback Javascript many

Native callback Javascript many

作者: 南国青天 | 来源:发表于2017-12-18 11:33 被阅读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

    相关文章

      网友评论

          本文标题:Native callback Javascript many

          本文链接:https://www.haomeiwen.com/subject/knipwxtx.html