Phase 1 — Fabric bootstrap
Layer: JS + cloud + optional native Keychain
Ensure the active home is a Matter fabric with credentials ready. No MatterSupport / MTR yet.
| Step | Caller | Callee | What |
|---|---|---|---|
| 1 | Commissioning hook | store.getCurrentHome() | Get active home |
| 2 | isFabricReady() | — | Matter home? consent needed? |
| 3 | (if needed) | fabric.convertToFabric() | Cloud: convert group → fabric |
| 4 | runFabricCommissioning | fabric.getFabricDetails() | Fetch root CA, IPK, fabricId, CATs |
| 5 | (if no user NOC yet) | fabric.issueUserNoC() | Cloud: issue user operational cert |
| 6 | user.storePrecommissionInfo(...) | Persist NOC + fabric creds in Keychain |
Native touch (pre-commission)
ESPMatterModule.generateCSR()— creates iOS Keychain key pair viaMTRCSRKeys(groupId:)+ PKCS#10 CSR viaMTRCertificates.createCertificateSigningRequest.ESPMatterUtilityModule.storePrecommissionInfo()— stores user NOC JSON in Keychain under accountuser_noc_<fabricId>.
This is the user NOC (Phase 1), not the device’s node cert in Phase 6.
What could go wrong
Fabric conversion declined → user navigates back. issueUserNoC fails or group id mismatch → error phase with fabric/credential messages. User NOC missing from Keychain when custom commissioning starts → native throws User NOC not found for fabric.