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

Add Safari support #20

Open
alexanderatallah opened this issue Apr 14, 2023 · 6 comments
Open

Add Safari support #20

alexanderatallah opened this issue Apr 14, 2023 · 6 comments
Labels
blocked Blocked on another issue

Comments

@alexanderatallah
Copy link
Owner

  • I should be able to install it in Safari and also on Safari mobile.
  • Should be able to leverage Plasmo and bugs they've fixed recently (e.g. [RFC] Allowing building non-minified version PlasmoHQ/plasmo#463)
  • The Extension module in core/extension.ts should prob be the only place with Safari-specific code - the rest of the extension shouldn't care about the platform.

This will allow iOS users to use window apps!

@alexanderatallah alexanderatallah added the good first issue Good for newcomers label Apr 14, 2023
@louisgv
Copy link
Collaborator

louisgv commented Apr 15, 2023

This will likely be blocked by either:

PlasmoHQ/plasmo#521

Or Plasmo should just spit out the safari bundle <- I will investigate this.

@louisgv
Copy link
Collaborator

louisgv commented Apr 16, 2023

Screenshot 2023-04-16 at 7 33 12 PM

Popups and stuffs are good to go on Safari. The BGSW tho has some problems - I suspects some API incompatibility.

@louisgv
Copy link
Collaborator

louisgv commented Apr 17, 2023

I think it's impossible to debug Safari Service Worker lol - it shows only "Service Worker failed to load"...

@louisgv
Copy link
Collaborator

louisgv commented Apr 17, 2023

Blocker for older Safari:

scripting
registerContentScripts, getRegisteredContentScripts, unregisterContentScripts, updateContentScripts supported in Safari 16.4 or later.

The mainworld script injection requires the above APIs.

https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

Some other refs:

@louisgv
Copy link
Collaborator

louisgv commented Apr 17, 2023

It works!

Screenshot 2023-04-16 at 9 19 16 PM

Key requirement is latest MacOS Ventura 13.3.1 (22E261) with Safari 16.4

A patch on Plasmo side is needed to fix up some undefined lookup, will PR in a bit.

@alexanderatallah
Copy link
Owner Author

This is awesome 🔥

I'll need to update my system to 16.4 before I can test (we'll want to check mobile Safari support too). But this is going to be even more amazing once people have a nice way of sharing credentials between desktop and mobile, coming soon

@alexanderatallah alexanderatallah added blocked Blocked on another issue and removed good first issue Good for newcomers labels Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue
Projects
None yet
Development

No branches or pull requests

2 participants