Adopting Declarative Content Blocking in Safari Web Extensions
Block web content with your web extension using the declarative net request API.
Overview
Configure the Sample Code Project
Before you run the sample code project in Xcode:
On macOS:
Open Safari and choose Develop > Allow Unsigned Extensions.
In the project settings in Xcode, select the Blocker (macOS) target.
Click the Signing & Capabilities tab.
For Signing Certificate, choose Sign to Run Locally. (Leave Team set to None.)
Repeat steps 3 and 4 for the Blocker Extension (macOS) target.
On iOS, to run on a device:
In the project settings in Xcode, select the Blocker (iOS) target.
Click the Signing & Capabilities tab.
Select a development team.
Repeat the above steps for the Blocker Extension (iOS) target.