-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search by sharing an image on iOS #184
Comments
The only reliable workaround I have found is to open a real web page in Safari when the user shares an image, and handle the event using a content script, so we'll have to use this method until the regression is fixed in Safari. The We open the |
In the future there won't be a need for such workarounds if extensions will be able to register themselves as share targets. |
The feature will be enabled only for iOS at the moment, more work is needed in the native app to support sharing on macOS. The Xcode project with the native app will be merged in the |
A new feature was added to search with an image from the device by sharing it on iOS (1cae724). The image is passed from a Share Extension to Safari by first opening the
https://search-by-image.localhost/share?id=<shareId>
page for the extension to detect the event using thewebNavigation
API, verify if the one time ID matches with the one stored by the Share Extension, then redirect the tab to a local extension page that fetches the image using native messaging.This solution for bridging the share event with the browser worked well, and requesting
search-by-image.localhost
did not cause any network requests. The problem is that around the time the feature was merged, Apple released Safari 15.4 with a regression that breaks mostly all event listeners related to tabs in the background page. Extensions can no longer reliably detect from non-persistent background pages if a new page is loaded or if a new tab is opened in the browser. I have submitted a bug report using Feedback Assistant.https://feedbackassistant.apple.com/feedback/9960355
The text was updated successfully, but these errors were encountered: