Closed docyx closed 4 years ago
One year later with newer versions available I checked again but it seems like most of the necessary WebExtensions APIs are still not supported.
Tested with Safari 15, Xcode 13 and uBlock Origin 1.38.0, all newest production versions available at time of writing.
Compatibility check with xcrun safari-web-extension-converter ./uBlock0.chromium/
gives:
Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
browser_action
all_frames
options_ui
contextMenus
unlimitedStorage
storage
webRequest
commands
incognito
short_name
default_locale
tabs
webNavigation
<all_urls>
content_security_policy
version
name
web_accessible_resources
run_at
match_about_blank
js
webRequestBlocking
matches
page
privacy
manifest_version
icons
description
Warning: Persistent background pages are not supported on iOS and iPadOS. You will need to make changes to support a non-persistent background page.
Hello,
I attempted to convert the extension. Most APIs should be supported now. The lack of storage
and webRequestBlocking
might be annoying, but there are probably some workarounds for this.
mbp-de-michel:uBlock michel$ /Applications/Xcode.app/Contents/Developer/usr/bin/safari-web-extension-converter ./uBlock0.chromium/
Xcode Project Location: /Users/michel/git/uBlock
App Name: uBlock Origin
App Bundle Identifier: com.yourCompany.uBlock-Origin
Platform: All
Language: Swift
Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
storage
match_about_blank
webRequestBlocking
incognito
privacy
Warning: Persistent background pages are not supported on iOS and iPadOS. You will need to make changes to support a non-persistent background page.
The lack of ...
webRequestBlocking
might be annoying
The main feature?
https://browser.kagi.com/faq.html if you really need to use webkit, but with ublock origin. Still kinda beta so not perfect yet but seems like a solid project. I used app a bit and it feels like using safari, but it does lag behind on feature support. I could not get push notification api to work with it yet for example.
Hey! Recently switched to uBlock and must say I really like it. Are there any updates on this issue? Is WebKit/Safari getting more of the APIs needed?
Hey! Recently switched to uBlock and must say I really like it. Are there any updates on this issue? Is WebKit/Safari getting more of the APIs needed?
https://www.reddit.com/r/uBlockOrigin/comments/sf0rjp/does_anybody_want_to_publish_ublock_origin_on/ https://www.reddit.com/r/uBlockOrigin/comments/re5y0i/safari_preview_adds_new_supported_features_are/
The lack of ...
webRequestBlocking
might be annoyingThe main feature?
Safari supports declarativeNetRequest
, which is the modern replacement for webRequestBlocking
: https://developer.apple.com/documentation/safariservices/safari_web_extensions/blocking_content_with_your_safari_web_extension
Is there a reason declarativeNetRequest
cannot be used?
@MisutaaAsriel https://github.com/uBlockOrigin/uBOL-home/issues/52
(this is not an actual issue, just a request, so I removed the template)
uBlock hasn't worked on Safari for a while now, since Apple used a proprietary extension API which caused a lot of issues. more info.
With the new Safari 14 release, it now supports the WebExtensions API. Since uBlock uses this API, it would be really nice to have uBlock on Safari now that it supports it.
Also time to update https://github.com/gorhill/uBlock/blob/master/platform/safari/README.md#safari-platform as well (: