Replies: 4 comments 4 replies
-
I quickly hacked something into the code and it works correctly. The important point is: "A WKWebView is included in the array of activityItems". So Just as a POC: in ShareExtensionHelper: modify createActivityViewController to accept a webView as a param and to add it to the activity items:
in BrowserViewController presentShareSheet: call createActivityViewController to pass in the tab's webview:
That's all that's needed When you run it on ios16.4 the Add to Home Screen option is available and works. Notes:
|
Beta Was this translation helpful? Give feedback.
-
It's not automatically added to the Share menu. Browsers on iOS will need to add support.
We are happy to help if there are any questions. |
Beta Was this translation helpful? Give feedback.
-
Simulator support for A2HS is known to be buggy (In Safari, too) But your code change seems exactly right to me to work on device (for Firefox, which has the browser entitlement) |
Beta Was this translation helpful? Give feedback.
-
Not working on IOS 16.4, Firefox 111.2 (29672) Works in iOS safari.. Test site: ( see demo link ): In FF, when I click share, I don’t see “ Addd to Home Screen”. |
Beta Was this translation helpful? Give feedback.
-
Not sure if explicit support is needed for this as the documentation is a bit vague as to whether the "Add to Home Screen" options is automatically added to the share sheet or not. If not automatic, it should probably be planned for as it would be nice support adding to home screen from Firefox
https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/
and scroll to "Third-party browser support for Add to Home Screen"
"Starting in iOS and iPadOS 16.4 beta 1, Home Screen bookmarks will now open in the user’s current default browser"
Beta Was this translation helpful? Give feedback.
All reactions