> Avoid using a web view to build a web browser. Using a web view to let people briefly access a website without leaving the context of your app is fine, but Safari is the primary way people browse the web on iOS. Attempting to replicate the functionality of Safari in your app is unnecessary and discouraged.
So I guess Appple didn’t really mean it when they started supporting a default browser on iOS.
All of the Extension talks only mention Safari, but maybe there is a way?
[0]: https://developer.apple.com/design/human-interface-guidelines/ios/views/web-views/
iOS Safari has some limitations [1], e.g.
1. the time it can run the background script.
2. you need to use the Alarm API (minute resolution) instead of `setTimeout`
3. no support for `contextMenus`, so you'll have to make your own.
If you need `executeScript` in Safari:
if (typeof chrome.scripting === "undefined")
chrome.scripting = {
executeScript: ({ files, target }) =>
browser.tabs.executeScript(target.tabId, { file: files[0] })
}
[1]
https://developer.apple.com/documentation/safariservices/saf...
They really don’t want you to use anything other than Safari