plibither8 / refined-hacker-news

✨ Hacker News, but refined — Interface tweaks and features to make the HN experience better

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Safari Web Extension

vwkd opened this issue · comments

commented

Continuing #31 since Safari now supports Web Extensions.

Anyone wants to take this up?

Thanks for opening this issue, @vwkd! Unfortunately, I still don't have an Apple device with me to develop and test this. I would love it if anyone can take this up - so pinning this issue! <3

Took a quick run at this:

# xcrun safari-web-extension-converter --app-name "Refined Hacker News" --bundle-identifier io.robbie.refinedhn --swift dist/
objc[29794]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1e23b3130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047902c8). One of the two will be used. Which one is undefined.
objc[29794]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1e23b3180) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104790318). One of the two will be used. Which one is undefined.
Xcode Project Location: /Users/robbiet480/Repos/refined-hacker-news
App Name: Refined Hacker News
App Bundle Identifier: io.robbie.refinedhn
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:
	history
	applications
Warning: Persistent background pages are not supported on iOS and iPadOS. You will need to make changes to support a non-persistent background page.

How critical are the history and applications permissions? Can the background page be non-persistent (it must be if you want to run on iOS).

So far, it seems to be running fine!

Taking a look at this again... the history permission just isn't available period on macOS or iOS Safari, so hide-read-stories is gonna need to be disabled at build time, that's fine.

What's the reasoning for requiring a persistent background page? That is being removed in manifest v3 anyway, looks like it was originally added to support Firefox at aca0a70 but I don't think its needed any longer?