Safari Extensions

RSS for tag

Enhance and customize the web browsing experience on Mac, iPhone, and iPad with Safari Extensions

Posts under Safari Extensions tag

103 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Safari Web Extension background script becomes unresponsive after 30 seconds
I'm experiencing a Safari Web Extension issue where the non-persistant background script seems to crash after 30 seconds even when the content script is messaging it. Here is a minimal-reproducible example. When running in an emulator, the background script will stay responsive forever. However, when running on a physical device, the background script becomes non-responsive after 30 seconds of activity. It never becomes responsive again until I toggle the extensions enable/disable toggle, after which it stays active for 30 seconds and then crashes again.
0
0
4
2m
Testflight and AppStore installation fails
I'm working on this Mac Safari extension https://apps.apple.com/app/id6464076425 The installation of the app via Testflight stops without any success (only for me) As well as the installation via AppStore. This happens only to me. I tried it on another computer, and it installed successfully. Here are some videos: This makes the development and release process impossible until I solve this problem. I tried all the methods I could find online, such as: Deleting the currently installed app Restarting Safari Restarting my Mac Is there anything else I can do to fix this problem?
0
0
61
1d
Safari History Delete ISSUE
My Safari Web Extension uses a service worker and an IndexedDB database (IDB). For what hidden reason or perverse logic when deleting the Safari history all service workers are brutally shutted down and the database emptied of all its contents? And I heard about local storage too... It happens all the time in Safari macOS and iOS. Safari is the only browser in the world that takes the liberty of deleting what it shouldn't. Good Job indeed.
1
0
139
2h
Safari DNR API timing issues
I created a Xcode project to test the DNR updateDynamicRules API performances on Safari (MacOS). https://github.com/radiolondra/TestUpdateDynamicRules Following the instructions in the README file, it's possible to test the extension on Chromium and Firefox browsers (on Windows). The project uses 2 json files containing static rules, enabled by default in the manifest file. These static rules are automatically installed in the browser when the extension is installed. Using the extension popup it is possible to add/remove just one very simple dynamic rule in the browser, a rule that acts on a predefined test domain (https://iana.org). What we want to measure is the time it takes for each browser to add/remove that one dynamic rule. The results for Safari are unacceptable to say the least: Safari: from 6000 to 8000 MILLISECONDS (6/8 seconds!) <<<<<<<<< Chrome: from 5 to 6 MILLISECONDS Firefox: from 5 to 7 MILLISECONDS Notice the time needed by Safari... It would be a good idea to take a look at this monstrosity. Thanks.
4
0
158
2d
NO EXTENSIONS INSTALLED on Settings > Safari > Extensions
I'm developing an extension on Xcode, trying to test on my iPhone 7 plus. When I connect my iPhone with my Mac that Xcode is running on, and click Run, the app shows up on my iPhone. But when I check Settings > Safari > Extensions, it says "NO EXTENSIONS INSTALLED. Extensions customize the way Safari works. Extensions can change the appearance or behavior of web content, add buttons to Safari, and more." I'm using : Xcode : Version 14.0.1 Mac OS monterey : Version 12.7.5 iPhone 7 plus : Version 15.8.2
1
0
119
1w
It's not possible to open a link in a new tab on a page with the "safari-web-extension://someurl..." protocol
I have an extension that opens the start page after installation with the URL: safari-web-extension://my-web-extension-page.html It's not possible on this page to open any link on a new tab if the link has attribute target="_blank" or even with "Command (⌘) + click" combination Are there any restrictions on pages with protocol safari-web-extension://?
2
1
506
1w
spacial computing
Hello, I've test Apple spacial computing since few weeks now. I've hope working on spacial computer will give me more productive. At this time, safari extensions I use (bitwarden) was not available. There is no other web browser available. I've not find how to use xcode in my spacial computer. I've not find any native (not iPad) terminal tool. Mac screen sharing only give me one screen (and I've got 4 in my desk). This screen can be very big but I prefer having 4 little screen better a big one. And screen sharing is not usable using mouse at all. my mouse always disapear from my screen when sharing with my spacial computer. For all theses case, using spacial computing for working is not realist at this time in my specific case. I lost to many time using it instead of using a "real" computer. Hope this message can help you to upgrade software and give me all tools needed to use it to work. Best regards, Julien Boquet
0
0
134
1w
For a Mac Safari web extension, how to actually implement IAP?
I want to implement in-app purchases for my Mac Safari web extension. I can think of two ways: Draw the payment UI in an extension web page, and send a message to the native extension app to call StoreKit code. Open the container app from an extension web page, where the app draws the payment UI. I couldn't make #1 work with either StoreKit 2, which is async, and context.completeRequest(returningItems:) doesn't want to be called in a Task, saying context is not sendable) or StoreKit 1, where calling context.completeRequest(returningItems:) in paymentQueue(_:updatedTransactions:) for some reason doesn't return a response to the extension's web page. I couldn't make #2 work because I couldn't find a way to open the container app from the web extension. I registered a custom URL for my container app, but context.open that url does nothing. Web extensions that use IAP with #2 are available on the Mac app store, so it must be possible, could anyone shed some light on how to open the container app and pass the purchased info to the extension web page even if the container app is not open? Thanks in advance.
0
0
136
3w
Content script sometimes does not load
Steps to reproduce the problem: Have an extension which has a content_scripts section in its manifest that specifies a content script for some URLs. Open a tab at a URL that the extension should inject a content script in. What is the expected behaviour? The content script should execute on the page, and if you open the Developer Tools and go to the Console tab, then the extension should be listed inside of the "Extension Scripts" dropdown (the dropdown immediately to the right of the "Clear console" button). What went wrong? After prolonged inactivity, sometimes the content script doesn't show up in the Extension Scripts dropdown (which it would if it were executing). There's no evidence in the page's Developer Tools that the extension is active. It doesn't execute at all, there's no messages in the console related to it or its non-execution, and its content scripts don't show up in the Sources tab of Developer Tools. When the issue happens, the extension still shows up in the browser toolbar as an option.. The extension's icon shows up and functions normally. The extension background page is inspectable and seems to be running normally. Refreshing the webpage doesn't fix it. But once we open the ios App it starts working again. Safari version: 74 OS Version: OS X 10.14.5
1
0
210
2w
iOS 17.4: Safari Extensions broken?
We’ve received a lot of user complains after the latest iOS 17.4 update. Our Safari extension does not work as reliably as it used to be (sometimes it’s just not loaded, or very slowly). Is this a known issue? Are any workarounds available? On iOS 17.5 the problem seems to be fixed, but I’m still wondering for a workaround because we dont know how long until 17.5 is released.
0
0
361
Apr ’24
iOS 17.4.1 Safari extension issues
Since updating to iOS v17.4.1 our safari extension no longer functions as it used to We are experiencing issues where our content script is not getting initialized, On devices running iOS 17.4.1, the content script included in our extension does not appear to run. There are no logs from the content script in the console, whereas on other versions and devices, it operates as expected. Our Extension relies con communication between the background and content scripts in order for us to render various popups to our users, based on our logs as of iOS 17.4.1 this communication is not successful, we can see messages being sent from the background script but as mentioned above nothing on the content script side. This behavior happens majority of the time and on random sites, sometimes opening the same site in a new tab would work but not always. There are also times where we would only receive our popups after opening the safari menu and interacting with our extension via this menu. Please assist with a way forward
13
3
1.5k
1w
Safari Web Extension update asks to restart Safari.
We have an app with a web extension for Safari. We developed this app for a couple of years. Recently when we pushed an update to TestFlight or the Mac App Store, the user that updated the app, there's the dialog from macOS that asks to : Close Safari to continue the update. Click on continue to quit "safari" … It seems a recent change. Is there a way to prevent quitting Safari when we push to update to TestFlight and Mac App Store?
0
0
269
Apr ’24
TestFlight is installing the incorrect version and build of the application.
I have created a new build for my Safari web extension and distrbuted it to test flight. Test Flight says I am using the correct version - but when I go to the Setting > Extensions in Safari and enable it - it still has the old version number. App Store showing the correct version is in testing Test Flight confirming said version number Safari with the incorrect version Any idea what I am doing wrong?
1
0
311
Mar ’24
Team Error encountered while publishing the Safari extension via Xcode
I've created a Safari extension using Xcode, and it works fine on my local system. However, when I try to deploy the extension, I encounter an error message stating "No team found in archive." I've already added the team while setting up the extension. Could someone please assist me in identifying what I might be doing incorrectly? Below are screenshots showing my configuration and the error message I'm encountering during deployment. Following are the configuration screeshots Following is the error screeshot
0
0
323
Mar ’24
Feasibility understanding
I want to develop a safari extension for a study for a pet project website. I want to understand the challenges faced by the users while making searches on my e-commerce website. So the extension would basically trigger a survey when active on my website. If I were to understand what was searched on the website I would need to capture the url for the current page on they are on. Would this be possible? Would it comply with Apple regulation policies?
0
0
261
Mar ’24