Post

Replies

Boosts

Views

Activity

Reply to CarPlay navigation issue, maximum depth
I got an answer directly from Apple: You've hit upon one of the most common and often confusing limitations in CarPlay development, the template stack depth limit. For most CarPlay apps, the navigation stack depth is limited to two templates. This means you can have a root template, and then push one more template on top of it. Attempting to push a third template will result in the "maximum level exception" you're seeing. Apple's first-party apps (like Music, Maps, Phone) often have special entitlements and UI paradigms that are not available to third-party developers, my apologies. Third-party apps that qualify for specific categories (e.g., audio, navigation, EV charging, parking, food ordering) can use CPTabBarTemplate, but even then, each tab's stack is still limited to two. Yes, the crash reports and the "maximum level exception" are clear indicators of exceeding the template stack depth. This is not a bug in your code's logic, but rather a design constraint imposed by CarPlay for safety reasons. Since you cannot simply push more templates, you need to rethink your app's information architecture and navigation flow within the CarPlay constraints. The most common strategy is to update the content of an existing template rather than pushing a new one. I was aware that there are some limits, however, we have a maximum of 2 and only for Apple's first-party apps some exceptions. Lesson learned.
Topic: Design SubTopic: General Tags:
2w