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

Download file in iOS app #985

Open
teusbenschop opened this issue Dec 1, 2024 · 0 comments
Open

Download file in iOS app #985

teusbenschop opened this issue Dec 1, 2024 · 0 comments

Comments

@teusbenschop
Copy link
Member

Before the current iOS app was written in Swift with SwiftUI, it was able to download a file.

This was de code in Objective-C:

- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler
{
  if (navigationResponse.canShowMIMEType) {
    decisionHandler(WKNavigationResponsePolicyAllow);
  } else {
    [[UIApplication sharedApplication] openURL:navigationResponse.response.URL];
    decisionHandler(WKNavigationResponsePolicyCancel);
  }
}

This issue calls for implementing the file download in the SwiftUI app.

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

1 participant