Skip to main content

Phase 2 — Hand off to native

Layer: JS → Swift

Call chain

Native (ESPMatterModule.startEcosystemCommissioning)

  1. Stores currentFabricInfo and promise resolve/reject blocks.
  2. Calls startAppleFabricCommissioning(qrData:fabric:) on matterQueue.
  3. Does not resolve the promise until Apple + custom commissioning complete or fail.

ESPMatterCommissioningAdaptor

Registers NativeEventEmitter listener before calling native. Forwards:

  • NODE_NOC_REQUEST → SDK issueNodeNoC handler
  • COMMISSIONING_CONFIRMATION_REQUEST → SDK confirmMatterNodeCommissioning handler

What could go wrong

Missing fabricId, empty QR payload, or iOS < 16.4 → promise rejects with COMMISSIONING_FAILED / APPLE_COMMISSIONING_FAILED and emits COMMISSIONING_ERROR.

On this page