CarPlay Integration Scope and Safety Constraints
mainWhen integrating SwiftNEW with CarPlay, adhere to the following architectural constraints to ensure compliance with Apple's guidelines:
- Template Type: The adapter uses
CPListTemplaterather thanCPInformationTemplateor SwiftUI. This ensures compatibility across a wider range of eligible template-app categories. - Hierarchy Limits: To stay within the strict two-level hierarchy allowed for quick-ordering apps, the 'What's New' content acts as the root, and selected details act as the second level.
- History Implementation: Historical data is displayed using
CPListTemplate.updateSections(_:)on the existing root rather than pushing a new template, preserving the two-level limit. - UI Limitations: A phone's SwiftUI
ContentViewcannot be rendered on a CarPlay display. TheContinuecallback must replace the SwiftNEW root with a nativeCPTemplate. - Interaction: The
Continuebutton is implemented as aCPBarButtonto avoid consuming the runtime list-item allowance.