react-native-wkwebview icon indicating copy to clipboard operation
react-native-wkwebview copied to clipboard

onShouldStartLoadWithRequest return false not work

Open hanxk opened this issue 6 years ago • 3 comments

  • test url:
    https://share.iclient.ifeng.com/shareNews?fromType=vampire&forward=1&aid=sub_24943526
      (after opening click play video)
  • my code:
    _onShouldStartLoadWithRequest = (navigator) => {
        let scheme = navigator.url.split('://')[0]
        if (scheme === 'http' || scheme === 'https') {
            return true;
        }
        // intercept an invalid url: comifengnewsclient://call?type=doc&id 
       // return false not work, i got a 'NSURLErrorDomain'
        return false;
    }

hanxk avatar Aug 06 '17 01:08 hanxk

I noticed that it only fails when the app is running in debug mode.

greis avatar Aug 28 '17 18:08 greis

I noticed that it only fails when the app is running in debug mode.

the same, return false not work

fisherli avatar Sep 19 '18 09:09 fisherli

@hanxk @fisherli if your link try to open an app that includes http or https like "https://itunes.apple.com" you need to return false I thought it is related to universal link, because they use standard HTTP or HTTPS links

bang9 avatar Jan 29 '19 05:01 bang9