Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building a High-Performance Safari Content Blocker on iOS with Declarative WebKit Rules

Introduction: The State of Ad Blocking on iOS When developing ad-blocking solutions on iOS, developers face a major architectural choice between: Declarative WebKit Content Blockers ( SFContentBlockerManager ) Local VPN Packet Tunnels ( NEPacketTunnelProvider ) While local VPN proxies can inspect all device traffic, they introduce severe downsides: significant battery consumption, latency spikes,…

Title: Building a High-Performance Safari Content Blocker on iOS with Declarative WebKit Rules

The choice between declarative WebKit Content Blockers and local VPN packet tunnels for ad-blocking solutions on iOS presents developers with significant architectural considerations. Local VPN proxies offer comprehensive device traffic inspection but come with drawbacks like substantial battery drain, latency increases, and privacy risks as user network packets traverse an active background tunnel.

AdBlocker Pro addresses these concerns by leveraging Apple's declarative WebKit Content Blocker API. This approach enables zero-knowledge on-device rule execution, where the iOS host application compiles a declarative JSON ruleset and seamlessly hands it to the WebKit subsystem. Crucially, the app remains oblivious to URLs, tabs, or DNS queries, ensuring privacy and security.

Moreover, rule matching occurs within Apple's native C++ WebKit pipeline, guaranteeing uninterrupted blocking even if the host app crashes or is terminated.

AdBlocker Pro tackles the limitations of strict rule counts imposed by WebKit through modular content extensions. Classifying rules into three categories—Advertising Trackers, Privacy Telemetry, and Cosmetic Filters & Cookie Banners—allows for efficient dynamic packaging into App Group shared storage. The rules are then compiled into WebKit via SFContentBlockerManager.reloadContentBlocker(), enabling real-time toggling and instant App Group synchronization.

The high-performance content blocking solution boasts a minimal memory footprint (~12 MB RAM) and offers ultra-low latency. AdBlocker Pro is available on iOS 16.0+ and iPadOS 16.0+, and further details, including App Store link and support resources, can be found at specified links.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Build an Admin Dashboard in React

An admin dashboard is mostly three things: a row of numbers that matter, a chart that shows the trend, and a table of recent activity.

  • Admin dashboard built with React using KPI cards, revenue chart, and recent activity table
  • Each KPI card displays label, value, change, and trend with color-coded indicators
  • Revenue chart shows monthly online and store revenue with automatic legend generation

The silent retry bug killing ASP.NET Core reliability (and how idempotency keys save you)

The Silent Retry Bug: Why Your Resilient .NET System Is Actually Fragile If you’ve spent any time working with distributed systems in C# and ASP.NET Core, you know the drill: network calls fail…

  • Distributed systems in ASP.NET Core experience network issues like timeouts.
  • Conventional retry policies from Polly can cause data inconsistency.
  • Idempotency Keys prevent duplicate-state problem by ensuring state-changing requests are unique.

More from Tuesday 6 October →