cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.25k stars 7.06k forks source link

UIWebViewImpl-ios onJsCallback jsScheme not a request url #20637

Open mm-longcheng opened 3 years ago

mm-longcheng commented 3 years ago

Steps to Reproduce:

  1. UIWebViewImpl-ios.mm decidePolicyForNavigationAction
    // NSString *url = [[[navigationAction request] URL] absoluteString];
    // if ([[webView.URL scheme] isEqualToString:self.jsScheme]) {
    NSURLRequest* request = [navigationAction request];
    NSString *url = [[request URL] absoluteString];
    if ([[request.URL scheme] isEqualToString:self.jsScheme]) {