fix: connection callback bug + provisioning diagnostics #34
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "schwifty/provision-diagnostics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Fix
Root cause found: All provisioners called
centralManager.connect()but BLEManager was the onlyCBCentralManagerDelegate. BLEManager never implementeddidConnectordidFailToConnect, so provisioner connection continuations were never resumed — they always hit the 5-second timeout.This means provisioning has been impossible through the modular provisioner path.
Fix
didConnect,didFailToConnect,didDisconnectPeripheralto BLEManager's CBCentralManagerDelegatebleManagerreferenceDiagnostics
Added
ProvisionLog— a timestamped diagnostic log that captures every provisioning step:On failure, the log is displayed in the UI with a Share button so John can screenshot or share the full trace.
Files Changed
BLEManager.swift— added missing CBCentralManagerDelegate methods + connection callback closuresProvisionerProtocol.swift— addedbleManageranddiagnosticLogto protocolDXSmartProvisioner.swift— connection fix + full diagnostic loggingKBeaconProvisioner.swift— connection fixBlueCharmProvisioner.swift— connection fixFallbackProvisioner.swift— passes through bleManager/log to child provisionersScanView.swift— wires up diagnostics, shows log on failureProvisionLog.swift— new diagnostic log service