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

Crash app with ads redirect to "about:blank" #966

Closed
TranNghiaHiep opened this issue Apr 12, 2024 · 1 comment · Fixed by #987
Closed

Crash app with ads redirect to "about:blank" #966

TranNghiaHiep opened this issue Apr 12, 2024 · 1 comment · Fixed by #987

Comments

@TranNghiaHiep
Copy link

TranNghiaHiep commented Apr 12, 2024

When I click on an ad that redirects to "about:blank" or when I try to click on an ad quickly as soon as it appears, it redirects to "about:blank". App crash with error: "*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported.'"

@TranNghiaHiep
Copy link
Author

I tried adding a code snippet to check the URL scheme before redirecting, and it works. Will this have any impact?

Line 333 in file PBMWebView.m

if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"]) {
[self.delegate webView:self receivedClickthroughLink:url];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant