Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onShouldStartLoadWithRequest return false not work #79

Closed
hanxk opened this issue Aug 6, 2017 · 3 comments
Closed

onShouldStartLoadWithRequest return false not work #79

hanxk opened this issue Aug 6, 2017 · 3 comments

Comments

@hanxk
Copy link

hanxk commented Aug 6, 2017

  • 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;
    }
@greis
Copy link

greis commented Aug 28, 2017

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

@fisherli
Copy link

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

the same, return false not work

@bang9
Copy link

bang9 commented Jan 29, 2019

@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

@hanxk hanxk closed this as completed Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants