react-native-wkwebview
react-native-wkwebview copied to clipboard
onShouldStartLoadWithRequest return false not work
- 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;
}
I noticed that it only fails when the app is running in debug mode.
I noticed that it only fails when the app is running in debug mode.
the same, return false not work
@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