Skip to content

Conversation

murilopereirame
Copy link
Contributor

Some providers require that we provide a valid User-Agent to be able to fetch ics content. This commit injects the current User-Agent from the WebView in the fetch request to solve this problem.

Some providers require that we provide a valid User-Agent to
be able to fetch ics content. This commit injects the current
User-Agent from the WebView in the fetch request to solve this
problem.
@murilopereirame murilopereirame linked an issue Sep 3, 2025 that may be closed by this pull request
4 tasks
@@ -64,6 +64,7 @@ class ViewController: UIViewController, WKNavigationDelegate, UIScrollViewDelega
#endif

let commonSystemFacade = IosCommonSystemFacade(viewController: self)
let userAgent = "\(self.webView.value(forKey: "userAgent") ?? "")"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I couldn't find any docs about this way of getting the user agent, could you please later share it with me?

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

Successfully merging this pull request may close these issues.

Failing sync for external calendars due missing Header
2 participants