gitmyhub

NotifBridge

Swift ★ 0 updated 2mo ago

iOS 26.5 AccessoryNotifications + AccessoryTransportExtension BLE demo with a macOS receiver

A demo iOS and Mac app that forwards iPhone notifications to a Mac over Bluetooth using Apple's new AccessoryNotifications APIs.

SwiftSwiftUIiOSmacOSBluetooth LEsetup: hardcomplexity 4/5

NotifBridge is a demo app showing how to use iOS 26.5's AccessoryNotifications and AccessoryTransportExtension APIs to forward iPhone notifications to a Mac over Bluetooth Low Energy (BLE), a wireless protocol for short-range, low-power communication. The Mac acts as a custom BLE accessory, and the iPhone delivers encrypted notifications to it.

On the iPhone side, three extensions work together. The DataProviderExtension receives each notification and serializes its title, body, and source. The TransportSecurityExtension handles key exchange using a scheme called XWing, establishing a shared secret with the Mac. The TransportAppExtension writes the encrypted payload to the Mac over BLE using standardized GATT characteristics (named data slots in the BLE protocol). On the Mac side, a SwiftUI app advertises itself over BLE, reassembles incoming data chunks, decrypts the payload using HPKE (Hybrid Public Key Encryption, a modern encryption standard), and displays the notification in its window and as a native Mac banner.

Because AccessoryNotifications is scoped to comply with European digital market regulations, the iPhone's Apple Account region must be set to the EU. A real device on iOS 26.5 or later is required — the iOS Simulator cannot exercise Bluetooth or the pairing flow. The Mac must run macOS 26.0 or later, and access requires an Apple Developer Program membership with specific gated entitlements that must be requested from Apple.

The repository includes an automated end-to-end test script and documentation of a known intermittent Bluetooth permission issue that can occur on first launch after reinstalling. The full README is longer than what was provided.

Where it fits