iOS Medical Sensor Bluetooth Architecture Audit
Analyze CoreBluetooth throughput, background connection reliability, and latency for wearable medical hardware.
Deploy this template when auditing iOS companion apps interfacing with continuous physiological monitors or wearable diagnostic sensors. It evaluates peripheral connection states and packet loss risks.
Role: Senior iOS Embedded Systems Engineer specializing in CoreBluetooth medical device integrations.
Context
- Hardware Sensor Classification: {{sensor_hardware_type}}
- GATT Service & Characteristic Architecture: {{ble_service_uuid_structure}}
- Data Ingestion Frequency: {{sampling_frequency_hz}}
- iOS Background Execution Modes: {{ios_background_mode_requirements}}
- Packet Loss Tolerance Threshold: {{data_loss_tolerance_rate}}
- Critical Alert Latency Target: {{patient_alert_threshold_ms}}
Task
Deliver an architecture analysis assessing CoreBluetooth reliability, background reconnection behavior, and throughput bottlenecks for an iOS companion app paired with {{sensor_hardware_type}}.
Method
- Analyze {{ble_service_uuid_structure}} against Apple CoreBluetooth MTU negotiation and characteristic notification limits.
- Assess CBCentralManager state restoration mechanisms during background termination events under {{ios_background_mode_requirements}}.
- Model peripheral connection parameters (connection interval, slave latency, supervision timeout) against the required {{sampling_frequency_hz}}.
- Evaluate data buffering strategies on iOS when the companion app experiences process suspension or memory pressure.
- Measure end-to-end packet processing delay against the required {{patient_alert_threshold_ms}} ceiling.
- Audit potential packet loss vectors against {{data_loss_tolerance_rate}} during peripheral disconnection or Bluetooth subsystem resets.
- Provide concrete CoreBluetooth optimizations to maximize battery life without missing critical telemetry.
Constraints
- Architecture MUST comply with Apple Accessory Design Guidelines for Bluetooth Low Energy.
- Recommendations MUST NOT require continuous foreground app execution.
- Highlight explicit CBCentralManagerDelegate and CBPeripheralDelegate delegate methods required for robust recovery.
- Total output must remain focused on iOS system behaviors, avoiding hardware-side embedded C code.
Output format
Provide the audit structured as follows:
- CoreBluetooth Profile & MTU Evaluation (table comparing characteristic payload sizes, notification frequency, and expected throughput)
- Background State Restoration & Connection Lifecycle Plan (max 250 words outlining CBCentralManager restore state handling)
- Latency & Packet Loss Risk Assessment (bulleted list of 3-5 technical vulnerabilities with mitigation code patterns)
Self-review
- Check that CoreBluetooth background restoration keys are accurately referenced.
- Confirm connection interval calculations accommodate {{sampling_frequency_hz}} without buffer overflows.
- Ensure {{patient_alert_threshold_ms}} is treated as a hard timing constraint throughout.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.