Sieve blocks ad and tracker domains across iOS apps through a local DNS filter. It downloads filter lists directly from their publishers and builds the blocklist on the device. It needs no backend.
For network request blocking and cosmetic filtering in Safari, use uBlock Origin Lite from the App Store. It covers Safari better than Sieve's former extensions did, so Sieve dropped them to focus on DNS protection across all apps.
uBlock Origin Lite requires iOS or iPadOS 18.5 or later. Sieve supports iOS 17 or later.
Sieve mirrors uBlock Origin's filter catalog, with groups for Built-in, Ads, Privacy, Malware protection and security, Multipurpose, Annoyances, Regions and languages, and Custom. Sieve downloads uAssets lists from uBlock Origin's CDN and uses the malware-filter project's DNS-friendly variants for the malware lists.
- uBlock Origin defaults: uBlock filters – Ads, Badware risks, Privacy, Unbreak, and Quick fixes, plus EasyList, EasyPrivacy, Online Malicious URL Blocklist, and Peter Lowe's Ad and tracking server list.
- DNS group: AdGuard DNS filter is enabled by default. StevenBlack Unified Hosts is available and disabled by default.
- Regional lists: On first launch, Sieve enables lists that match any of the device's preferred languages. Later language changes leave the user's list selections in place.
The DNS builder evaluates !#if conditions with env_mobile and env_safari set to true and other flags set to false. It uses domain blocks (||domain^, optionally with $important), domain exceptions (@@||domain^), hosts entries, and plain domain lines. Lists made up mostly of cosmetic rules can contribute few or no DNS domains. The app shows how many blocking domain entries each list contributes before deduplication.
Filter list publishers
│ HTTPS, on demand or when iOS runs a background refresh
▼
Sieve.app
SyncEngine → FilterUpdater → download due lists (conditional GET)
→ DNSBlocklistBuilder → build dns.bin if inputs changed
→ write build.json last
│
▼
App Group container
settings.json, lists/, downloads.json, dns.bin, build.json
│
▼
SievePacketTunnel (NEPacketTunnelProvider)
DNS-only split tunnel at 198.18.0.2:53
Blocked A / AAAA → 0.0.0.0 / ::; other types → empty NOERROR
Other queries → selected DNS-over-HTTPS upstream
- No backend. The app fetches lists directly from publishers. The tunnel sends allowed queries to the selected DNS-over-HTTPS resolver.
- Owed work is computed from disk.
settings.jsonholds the user's lists, rules, allowlist, DNS toggle and upstream choice. The app stores downloaded lists inlists/and their metadata indownloads.json. After downloading due lists, it buildsdns.binonly when the fingerprint of the inputs changes. It writesbuild.jsonwith that fingerprint last, so the next sync can retry an interrupted build. - My Rules uses the same DNS rule formats as filter lists. Add your own domain blocks and exceptions in the app.
- The allowlist takes effect without a rebuild. The tunnel reads it live from settings and always permits lookups for allowlisted domains.
- DNS lookups fit within the extension memory limit. Blocked domains are stored as sorted 64-bit FNV-1a hashes in the memory-mapped
dns.binfile. One million domains take about 8 MB. A lookup checks the full name and its parent domains (a.b.ads.com→b.ads.com→ads.com).
When upgrading from the Safari version, Sieve drops the old built-in Safari lists, adds the new catalog with its default selections, and keeps custom lists as disabled DNS lists. The next sync removes the old Safari files from the App Group.
Packages/SieveKit/
Sources/FilterKit/ Domains, DNS blocklist and builder, DNS messages and IP packets
Sources/SieveShared/ App Group files, settings, filter catalog, updater and sync engine
Sources/sievectl/ macOS CLI for building DNS blocklists and looking up domains
Tests/ XCTest suites for FilterKit and SieveShared
App/ SwiftUI app (Protection, Filters, My Rules, Allowlist)
Extensions/PacketTunnel/ SievePacketTunnel DNS filtering extension
UITests/ SieveUITests app flows
Benchmarks/ sievebench times downloads and DNS builds
project.yml XcodeGen spec for the app, tunnel and UI tests
Use Xcode 16 or later, iOS 17 or later, and XcodeGen (brew install xcodegen).
xcodegen generate
open Sieve.xcodeprojTo run on a device, set SIEVE_BUNDLE_ID to a bundle ID you own, SIEVE_APP_GROUP to group. followed by that bundle ID, and DEVELOPMENT_TEAM to your Team ID in project.yml. Run xcodegen generate again.
Enable the Network Extension capability for both the app and the tunnel. Their provisioning profiles must include the packet-tunnel-provider entitlement. The packet tunnel requires a physical device.
After installing, open Sieve once to download the filter lists and build the DNS blocklist. Turn on DNS protection in Sieve and tap Allow when iOS asks to add a VPN configuration.
An ad hoc build (Xcode calls it Release Testing) installs on registered devices without TestFlight or the App Store. You can register up to 100 devices of each type per membership year.
Each push of a local build to the release branch publishes Sieve.ipa and its SHA-256 checksum to a separate GitHub release. Download the IPA and follow the installation steps on a device included in the provisioning profiles.
To publish from your Mac, install XcodeGen, sign in to your Apple Developer team in Xcode, and register the devices you want to support. Commit the signing settings in project.yml to main. From the repository, run:
bash scripts/publish-adhoc.shThe script uses the Team ID, bundle ID, and App Group from origin/main to archive and sign in a temporary worktree. It creates or advances release with the IPA, checksum, and source commit SHA. GitHub Actions verifies the checksum and tags the release commit. Apple signing credentials stay on your Mac.
Keep release out of main. Each IPA contributes to the repository's Git history, and GitHub limits individual Git files to 100 MiB.
You need:
- A paid Apple Developer Program membership. Free accounts can't create ad hoc profiles or use the Network Extension capability that DNS protection needs.
- Xcode, signed in to that account (Xcode → Settings → Accounts).
- The UDID of each device you want to install on.
- Get the UDID. Connect the device to your Mac, select it in Finder, and click the text under its name until the UDID appears. You can also find it in Xcode → Window → Devices and Simulators under Identifier.
- Add the UDID at developer.apple.com → Devices. Running a debug build on the device from Xcode once also registers it.
Edit the settings at the top of project.yml, then run xcodegen generate:
SIEVE_BUNDLE_ID: com.yourname.sieve
SIEVE_APP_GROUP: group.com.yourname.sieve
DEVELOPMENT_TEAM: ABCDE12345 # your Team ID, from Membership detailsWith automatic signing, Xcode creates the App IDs, the App Group and the capabilities the first time you archive. If you manage signing manually, create these App IDs yourself:
| Target | Bundle ID | Capabilities |
|---|---|---|
| Sieve (app) | SIEVE_BUNDLE_ID |
App Groups, Network Extensions |
| SievePacketTunnel | ….tunnel |
App Groups, Network Extensions |
The app and tunnel must belong to the same App Group (SIEVE_APP_GROUP).
In Xcode:
- Choose the Any iOS Device (arm64) destination.
- Choose Product → Archive.
- In the Organizer, click Distribute App, then Release Testing, then Export.
The export folder contains Sieve.ipa.
From the command line (works in zsh, bash and fish; replace ABCDE12345 with your Team ID):
mkdir -p build
xcodebuild archive -project Sieve.xcodeproj -scheme Sieve -configuration Release \
-destination 'generic/platform=iOS' -archivePath build/Sieve.xcarchive \
-allowProvisioningUpdates
plutil -create xml1 build/ExportOptions.plist
plutil -insert method -string release-testing build/ExportOptions.plist
plutil -insert signingStyle -string automatic build/ExportOptions.plist
plutil -insert teamID -string ABCDE12345 build/ExportOptions.plist
plutil -insert thinning -string '<none>' build/ExportOptions.plist
xcodebuild -exportArchive -archivePath build/Sieve.xcarchive -exportPath build/adhoc \
-exportOptionsPlist build/ExportOptions.plist -allowProvisioningUpdates-allowProvisioningUpdates lets Xcode create or refresh the ad hoc provisioning profile so it includes every registered device. On Xcode versions before 15.3, use ad-hoc instead of release-testing as the method.
Ad hoc builds don't need Developer Mode turned on. Use any of these methods:
- Finder: connect the device and drag
build/adhoc/Sieve.ipaonto it in the Finder window. - Apple Configurator: select the device, then choose Add → Apps and pick the
.ipa. - Command line:
devicectlinstalls.appbundles, so unzip the.ipafirst:unzip -q -o build/adhoc/Sieve.ipa -d build/adhoc/unzipped xcrun devicectl device install app --device "<device name or UDID>" build/adhoc/unzipped/Payload/Sieve.app - Over the air: in the export dialog, check Include manifest for over-the-air installation. Host the
.ipaand themanifest.plistit generates over HTTPS. Then openitms-services://?action=download-manifest&url=https://your.host/manifest.plistin Safari on the device.
- Open the app once so it downloads the filter lists and builds the DNS blocklist.
- Turn on DNS protection in Sieve. When iOS asks to add a VPN configuration, tap Allow.
| Symptom | Fix |
|---|---|
| "Unable to install" or "integrity could not be verified" | The device isn't in the ad hoc profile. Register its UDID, export again with -allowProvisioningUpdates, then reinstall. |
| The app stops opening after a year | Ad hoc profiles expire after 12 months. Archive, export and install again. |
| DNS protection connects but does not block listed domains | Check that the app and tunnel have the same App Group entitlement. Run codesign -d --entitlements - build/adhoc/unzipped/Payload/Sieve.app/PlugIns/SievePacketTunnel.appex and repeat with the path to Sieve.app. |
| The DNS toggle fails right away | Check that both App IDs have the Network Extensions capability and that both signed targets have the packet-tunnel-provider entitlement. |
From the repository root, run the Swift package tests or try building and querying a DNS blocklist with a local hosts file.
(cd Packages/SieveKit && swift test)
(
cd Packages/SieveKit
swift run -c release sievectl dns --out /tmp/dns.bin /path/to/hosts.txt
swift run -c release sievectl lookup /tmp/dns.bin ads.example.com
)CI also generates the Xcode project and builds the Sieve scheme for the iOS Simulator. See the benchmark instructions for how to time downloading lists and building the DNS blocklist. The Benchmark workflow compares those timings between a pull request and its base branch.
- DNS protection blocks whole domains. It can't hide ad placeholders or block first-party ads served from the same domains as the content.
- The DNS tunnel uses a VPN slot. In split-tunnel mode, iOS may fall back to system DNS if the tunnel answers slowly.
- iOS gives background refresh a short time to download lists and build the blocklist.
Filter lists are downloaded at runtime and keep their own licenses.
Copyright (C) 2026 Ding YuChen
Sieve is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This is the same license AdGuard for iOS uses. See LICENSE for the full text.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.