AdBlocker Implementation in iOS Browser


#1

Hello Brave Community,

my Name is Magnus and I am a 16 year old iOS Developer. I’ve developed a browser for iOS in Swift and my question now is how to easily implement the Brave AdBlock System into this Project. I would be really thankful if someone can help me, I’m trying to implement this Feature for quite a long time now. Big thanks in advance and have a nice day.

Greetings,
Magnus


#2

cc @joel for more information


#3

The easiest way is to use Apple’s content blocker API, you can translate AdBlock filters to Apple’s JSON format.

We at brave use custom implementation as UIWebView is still used(content blocker api works only on WKWebView), most of ad blocking code is here if you want to study it: https://github.com/brave/browser-ios/tree/development/brave/src/webfilters


#4

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.