Post

Replies

Boosts

Views

Activity

declarativeNetRequest.getMatchedRules() does not return the blocked URLs of the current website until refreshed
We used declarativeNetRequest.getMatchedRules() to retrieve the blocked URLs. While we do receive a list, we noticed that the URLs captured do not always reflect the ones the content blocker is actively blocking at that moment. However, upon reloading the same page, the correct URLs appear. Screenshots are attached for your reference. First load: After reload:
2
0
278
Oct ’24
declarativeNetRequest.getMatchedRules() not working on iOS 18 Safari
declarativeNetRequest.getMatchedRules() gives us the below error: Error retrieving tabs or matched rules: – Error: Invalid call to declarativeNetRequest.getMatchedRules(). The 'activeTab' permission has not been granted by the user for the tab. We have added the "activeTab" permissions in the manifest (version 2). And in the device Safari extension settings we see that user has given permission as "allow".
2
0
281
Sep ’24
Enable/disable Safari web extension content blocker using declarative_net_request in manifest
Is it possible to enable/disable the enabled flag before the extension is loaded? we want to have a button in our app which controls the availability of the content blocker ruleSet in declarative_net_request in manifest (version 2). "declarative_net_request": { "rule_resources": [ { "id": "ruleset_1", "enabled": true, "path": "ruleset_1.json" } ] },
3
0
315
Sep ’24
Content blocker extensions vs content blocking using Safari extensions for dynamic URLs
We have observed that blocking content using Safari web extension does not fetch few URLS within the #document (documentURLs) because the onBeforeRequest webextension API is currently not available in Safari iOS. But it works fine using the Content blocking extension. We have a list of URLs which we want to block from the website. Which extension would you suggest the Content blocking extension or the Safari web extension?
1
0
242
Sep ’24
Safari web extension content blocker takes time to reflect on simulator few devices
We have implemented a content blocker using the Safari Web Extension, which can be toggled on or off as needed. However, we've noticed that changes in the Safari browser take effect only after the page is reloaded again. This behaviour has been observed across all simulators as well as on iPhone 8 Plus running iOS 16.7.8. Is this due to a delay in the JS file rules updation on simulator and lower devices?
1
0
327
Aug ’24
Content blocker using Safari web extensions.
We are trying to implement ad blockers using the Safari web extension, and we are implementing this using the declarativeNetRequest, with a manifest version 2. We have added a json file which contains a rule set for over 22000 URLs, does content blocker have a limit to the number of rules we set in json? Although it does work fine, sometimes we see the behaviour different on simulators and on clearing the cache it works fine is this expected?
4
0
770
Jun ’24
Safari Content Blocker extension
I have integrated the Safari Content Blocking extension, and it works perfectly on the first run, effectively blocking content on Safari. However, after re-installing the app, I occasionally encounter the following error, despite the content blocker functioning as expected: "Failed to reload content blocker Error Domain=SFErrorDomain Code=3 "(null)"" What could be causing this intermittent error?
0
0
505
Jun ’24