Skip to content

Commit b0cb287

Browse files
authored
Merge pull request #63 from MetaMask/fix/ios_blobs
fix: On iOS on opening of some Dapps there is download file pop up
2 parents 29ded70 + 9c2a41c commit b0cb287

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apple/RNCWebViewImpl.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,8 @@ - (void) webView:(WKWebView *)webView
13901390
static dispatch_once_t onceToken;
13911391

13921392
NSString *urlString = navigationAction.request.URL.absoluteString;
1393-
if ([urlString hasPrefix:@"blob:"]) {
1393+
// Some Dapps on opening send to mobile blob: urls. We ignore them and handle only urls which were received on clicks on Link (based on navigationType)
1394+
if ([urlString hasPrefix:@"blob:"] && navigationAction.navigationType == WKNavigationTypeLinkActivated) {
13941395
if (_onFileDownload) {
13951396
[self handleBlobDownloadUrl:urlString];
13961397
decisionHandler(WKNavigationActionPolicyCancel);

0 commit comments

Comments
 (0)