Never mind -- the talk that just started speaks directly to this and says Safari Web Extensions are separate from Safari App Extensions and will not require the macOS app wrapper.
Post
Replies
Boosts
Views
Activity
Ok, I take that back. Apple DOES still require the macOS app wrapper... but there is a new tool to do this (in Xcode) for us that you should only have to run once.
UPDATE: I ended up filing a bug Apple via the Feedback Assistant and they eventually fixed the bug (in Jan 2022). This now works as expected: the content script can listen for changes to storage on an options page with browser.storage.onChanged.
I posted a question and had an Apple employee reply and ask for more information. But I can't reply or comment on the post to provide that info. I've tried signing into another account and had the same problem. Here is the post: https://developer.apple.com/forums/thread/706346
I filed a bug report in July 2022 and it hasn't been responded to. The feedback ID is FB10544296
P.S. This post was locked when the wwdc21-10131 tag was applied which disabled my ability to reply, comment, or update the post.
Update after some more testing.
Good news: I CAN now block images in Gmail.
Bad news: I CAN NOT block images based on anything in the path after a "#" in Safari (where as I can in other browsers)
So if this is the url for the image I want to block:
https://ci3.googleusercontent.com/proxy/gHU4xG2VeSnDGYzSz5X#https://news.us13.list-manage.com/track/open.php?id=123
This rule WILL work:
{
"id": 1,
"priority": 1,
"action": { "type": "block" },
"condition": {"regexFilter": "gHU4xG2VeSnDGYzSz5X", "resourceTypes": [ "image" ] }
},
This rule will NOT work:
{
"id": 1,
"priority": 1,
"action": { "type": "block" },
"condition": {"regexFilter": "track", "resourceTypes": [ "image" ] }
},
THIS POST IS A DUPLICATE AND CAN BE DELETED (the original post was unlocked and I was finally able to reply to it).
Furthermore, this issue is somewhat fixed (I can get them to work in Gmail) but I found a new issue: DNR doesn't match against anything in the location.hash on a URL. More details in the original post: https://developer.apple.com/forums/thread/706346