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

Handle data scheme URLs for calendar invites #36595

Open
kylehickinson opened this issue Nov 30, 2023 · 2 comments
Open

Handle data scheme URLs for calendar invites #36595

kylehickinson opened this issue Nov 30, 2023 · 2 comments
Labels
enhancement feature-request OS/iOS Fixes related to iOS browser functionality

Comments

@kylehickinson
Copy link
Collaborator

kylehickinson commented Nov 30, 2023

Description:

Some sites use data:text/calendar urls to handle calendar invites.

Brave currently does not support data URLs in general (brave/brave-ios#666) but to add to that, we currently handle calendar invites by presenting a SFSafariViewController to handle the load and present the appropriate UI. This is unfortunately not possible to handle with data URLs as SFSafariViewController only supports http/https schemes.

One possible workaround is write the data in the URL (after the data:text/calendar prefix) to disk as a ics file and presenting it via QuickLook or the share sheet, at which point iOS may be able to show the appropriate flow for the calendar invite. This has been tested and does not work.

Another possible way would be to parse the actual invite and present an EKEventEditViewController. This will require a write-only permission prompt on iOS 16 and below, but on iOS 17 will be permission-free

@soner-yuksel
Copy link

Just curious is NSContactsUsageDescription and NSCalendarsUsageDescription is not necessary on iOS17?

@kylehickinson
Copy link
Collaborator Author

kylehickinson commented Dec 5, 2023

We would only need NSCalendarsWriteOnlyAccessUsageDescription and it would only actually be used on iOS 15 & 16, the reason being that EKEventEditViewController runs in a separate process in iOS 17 and no longer requires a permission prompt. Described here: https://developer.apple.com/videos/play/wwdc2023/10052/?time=296

More info here: https://developer.apple.com/documentation/eventkit/accessing_the_event_store

@kylehickinson kylehickinson added the OS/iOS Fixes related to iOS browser functionality label Mar 6, 2024
@kylehickinson kylehickinson transferred this issue from brave/brave-ios Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature-request OS/iOS Fixes related to iOS browser functionality
Projects
None yet
Development

No branches or pull requests

2 participants