Questions tagged [safari-content-blocker]

This tag should be used with questions about the safari-content-blocker extension (iOS and OS X).

The safari-content-blocker extension is available for booth iOS and Mac OS X. Content on websites such as javascript, css-elements, images and other files can be blocked from loading.

49 questions
3
votes
1 answer

Content Blocker extension with a String instead of a file

I'm using the function NSItemProvider(contentsOfURL: NSBundle.mainBundle().URLForResource("blockerList", withExtension: "json") in a content blocker extension. The thing is that all my rules are stored in a few dictionaries and, when I'm using this…
Armand Grillet
  • 3,229
  • 5
  • 30
  • 60
2
votes
0 answers

Facing issues with ContentBlockerRequestHandler of Safari extension

I am currently working on a safari app extension that blocks content. I want the user to configure the rule (turning a rule on and off). Since I can’t overwrite the bundled JSON files and we can’t write to the documents folder, as it’s not…
mike22
  • 33
  • 5
2
votes
1 answer

Problem with contentblocker in appwebview

hi i try block ads using ContentBlocker but but it doesn't work , i try with androidShouldInterceptRequest and it working fine but not available on ios for test i just try block all url contains "voiranime" and i use that regex ".*voiranime.*" but…
2
votes
1 answer

How to reload content blockers while they are active?

I have an app with several content blockers extension. Their configuration is fine and they act as they are supposed to. However I need to call reloadContentBlocker(withIdentifier:completionHandler:) from SFContentBlockerManager when I've updated…
lchamp
  • 6,592
  • 2
  • 19
  • 27
2
votes
0 answers

How to get the state(enabled/disabled) of safari content blocker app extension from safari toolbar item app extension?

I am developing the mac app with Safari Content Blocker and Safari Toolbar Item extensions. I am able to get the state of Content Blocker extension (enabled/disabled) in Safari from the mac app (Containing App), and able to display the warning…
Kevin Adesara
  • 3,830
  • 1
  • 17
  • 18
2
votes
2 answers

can I block specific website on safari using content blocker extension in iOS

I am working on a content blocker extension in an iOS app. I already blocked specific content on some website, but can I block the whole website using a content blocker extension?
ikbal
  • 1,114
  • 1
  • 11
  • 30
2
votes
0 answers

Adblock plus blocks my html contents in Safari but not in Chrome and FF

I am building my webpage. I installed Adblock and Adblock plus in Both chrome and Safari. In Chrome, it displays my content even when the Adblocker Plus is enabled But, same content when i try in Safari browser, then it does not display the…
2
votes
1 answer

Periodically update blockerList.json from a server

I’m building a content blocker app for iOS. Is there any way I can update the blockerList.json file from a server periodically in the background? I have no idea how to do this, or even where to start.
1
vote
1 answer

How to add or delete rule of safari content block list at run time

I am using in my project safari content blocker extension. when i set the rule in blockerList.json file statically and run the project every thing is working fine. Now i want to set my rule dynamically using the technic as it describes in below.…
1
vote
0 answers

Why is Safari Content Blocker preventing this redirect when clicked on my website?

I have created a button/link on my website using Javascript (provided by theBookingButton by Siteminder), this button contains a script that links to another web address when the button is clicked. Safari blocks this from working when their built-in…
1
vote
1 answer

Redirect from Safari App Extension Content Blocker

In a Safari App Extension Content Blocker, am I able to assign an action to a trigger that allows me to redirect to another page instead of blocking it outright?
Kevin Ghadyani
  • 6,829
  • 6
  • 44
  • 62
1
vote
1 answer

How to add whitelisted domains when using Safari Content blocker in the iPhone

What's the proper way to create whitelists when using Safari content blocker API? https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ContentBlocker.html Imagine I have an adult content blocker like this one,…
Ricardo
  • 2,831
  • 4
  • 29
  • 42
1
vote
0 answers

websites blocking through Content Blocking in Swift

I am creating an app where I want to block few websites by using Content Blocking Extension in Swift. If you guys have any idea to block websites through an app please suggest something.
1
vote
0 answers

How to Customize my blocking page with content blocker swift

I'm working with Content Blocker in Swift 3 and everything is working perfectly, but now I want to change my block page when a url is blocked through content blocker. As you can see in the image, my blocking page is so simple and I want to show an…
1
vote
0 answers

Reading/Writing data that is accessible from iOS app extension

I'm working on an iOS Content Blocker, but I would like to have the user choose what lists they want to block (ads, tracks, adult sites etc.). I found that the app extension and the containing app's bundles are separate and have no access to each…