Z***@163.com
Z***@163.com
  • 发布:2018-02-02 10:48
  • 更新:2018-02-02 10:48
  • 阅读:1100

IOS离线打包,第三方插件回调异常

分类:Native.js

IOS离线打包,第三方插件回调异常。
该插件会打开一个UIViewController界面,在界面操作完成后,回调出错。代码如下:

  • (void)ScanVin:(PGMethod*)commands
    {
    if ( commands ) {

    _CallId = [commands.arguments objectAtIndex:0];  
    
    __weak XHScanPlugin* control = self;  
    
    testViewController* test = [[testViewController alloc]init];  
    test.callback = ^(NSString *result,NSString* vin,NSString* url, NSString* info) {  
        NSLog(@"Callback");  
        PDRPluginResult *res = [PDRPluginResult resultWithStatus:PDRCommandStatusError messageAsString:@"test"];  
        [control toCallback:control.CallId withReslut:[res toJSONString]];  
    };  
    [self presentViewController:test animated:YES completion:nil];  

    }
    }

在调 [control toCallback:control.CallId withReslut:[res toJSONString]];时异常,感觉 Plugin Bridge内存被释放了。

2018-02-02 10:48 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复