wendux / DSBridge-IOS

:earth_asia: A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Method XXX is not invoked, since there is not a implementation for it

57267612 opened this issue · comments

  • (DWKWebView *)webView{

    if (!_webView) {
    _webView = [[DWKWebView alloc] initWithFrame:CGRectZero];
    [_webView addJavascriptObject:self namespace:nil];
    [_webView setAutoresizesSubviews:YES];
    [_webView.scrollView setAlwaysBounceVertical:YES];
    _webView.backgroundColor = [UIColor whiteColor];
    _webView.navigationDelegate = self;
    }
    return _webView;
    }
    -(NSString *)XXX:(NSString *)msg{
    return nil;
    }
    有什么毛病呢?一直显示上面的错误,安卓端已经实现,我换成2.0使用UIWebView还是不行

解决了,原因是前端这么写的
dsBridge.call("XXX",function(res){
})
后面加了个function方法就接收不到信号了,删掉就可以了。