Apple Developer onepage/WWDC26
#WWDC26#CoreBluetooth#NearbyInteraction#Accessories2026-06-08 · 08:12

用 Bluetooth Channel Sounding 讓配件有距離與方向感

這場 session 說明 iOS 27 如何透過 Bluetooth Channel Sounding 讓第三方 Bluetooth accessories 取得更可靠的距離估測,並可搭配 Nearby Interaction 與 Camera Assistance 產生方向感。

// 一句話結論

Channel Sounding 是介於 RSSI 猜距離與 UWB 精準定位之間的新選項:如果配件只有 Bluetooth chipset,也能透過 Core Bluetooth 取得距離,或透過 Nearby Interaction 取得距離加方向。

Apple Developer · WWDC26 · Video ID: pMDBJxJ0SNQApple Developer 官方頁
Decision map

這支影片幫配件團隊回答四個導入判斷

何時使用

只用 RSSI 不夠,但配件沒有 UWB

Apple 的定位很清楚:最高精準度仍是 UWB + Nearby Interaction;若配件只有 Bluetooth,Channel Sounding 才是比 RSSI 更適合的距離量測方案。

距離模式

Core Bluetooth 負責 distance-only

app 先確認裝置支援 .channelSounding,再對已連線的 CBPeripheral 啟動 channel sounding session,透過 delegate 收到以公尺計的距離結果。

方向模式

Nearby Interaction 加上 camera fusion

若需要方向,使用 NINearbyAccessoryConfiguration,把 Core Bluetooth 的 peripheral identifier 傳入,並在支援時啟用 Camera Assistance 來改善 direction output。

硬體條件

配件端規格會決定體驗能不能成立

accessory 必須支援 Bluetooth 6.3、inline PCT、phase-based ranging 的 mode-0 / mode-2,且 T_FCS interspace timing 至少 100 microseconds。

Implementation flow

從配對到距離 / 方向更新的實作流程

1

先完成配件設定與 Core Bluetooth 連線

影片假設 accessory 已透過 AccessorySetupKit 配對與設定,並且 app 已透過 Core Bluetooth 與 CBPeripheral 連線。

2

檢查本機 device capability

Core Bluetooth 路線用 CBCentralManager.supportsFeatures(.channelSounding);Nearby Interaction 路線則檢查 NISession.deviceCapabilities.supportsBluetoothChannelSounding。

3

distance-only:啟動 CB channel sounding session

建立 CBChannelSoundingSessionConfiguration(role: .initiator),對 connected peripheral 呼叫 startChannelSoundingSession,並在 delegate 裡處理 distance。

4

distance + direction:建立 NI accessory configuration

用 peripheral identifier 建立 NINearbyAccessoryConfiguration,支援時開啟 camera assistance,然後建立 NISession、設定 delegate、run configuration。

5

把 optional result 與暫停條件設計成產品狀態

distance 與 direction 都可能為 nil;背景時 session 會 pause;Bluetooth 或 Wi-Fi 活動增加時,iOS 可能降低量測頻率。UI 不能假設每次都有穩定輸出。

實務啟發:這是 accessory product decision,不只是 API decision

Channel Sounding 最適合「使用者知道配件就在附近,但需要分辨是哪一個或在哪個方向」的場景,例如溫度探針、工具、tag、健康或家用設備。若只需要是否接近,RSSI 或普通連線狀態可能已足夠;若需要精準室內定位,仍要評估 UWB。

Apple 明確提醒 iOS 27 只能在 foreground 使用 Channel Sounding;app 進入 background 後 session 會暫停。這會影響尋物流程、通知後開 app 的 loading state,以及使用者在移動畫面時的體感連續性。
API / framework 重點Core Bluetooth:CBChannelSoundingSessionConfiguration、startChannelSoundingSession、didReceive results。Nearby Interaction:NINearbyAccessoryConfiguration、Camera Assistance、NINearbyObjects。
硬體 / 平台限制iPhone 端需要 N1 chip;配件端需要 Bluetooth 6.3、inline PCT、mode-0 / mode-2 phase based ranging 與至少 100 microseconds 的 T_FCS。

風險與測試清單

測試不能只在桌上固定距離做 happy path。要測 moving / stationary motion state、多人與多配件環境、Wi-Fi 與其他 Bluetooth 活動高時的更新頻率、camera assistance 開關差異,以及 distance nil / direction nil 的 UI fallback。

accessory team 還要提早和 chipset / firmware 團隊確認 Bluetooth 6.3 與 phase-based ranging 能力。app 端 API 接上不代表量測品質成立;天線設計、反射環境、配件姿態與電源策略都會影響使用者感知。

// TL;DR