I'm developing a CarPlay music app and encountering a crash when trying to present a CPActionSheetTemplate using presentTemplate on the CPInterfaceController in iOS 15.2. The app functions as expected on iOS 17*.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unsupported object <CPActionSheetTemplate: 0x600000883720> <identifier: 154853B1-42C9-4A2E-A2AA-8431664FCDC4, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to presentTemplate:animated:completion:. Allowed classes: {(
    CPGridTemplate,
    CPListTemplate,
    CPNowPlayingTemplate,
    CPTabBarTemplate,
    CPAlertTemplate,
    CPVoiceControlTemplate
)}

Thanks in advance!

Answered by Frameworks Engineer in 787692022

Hi, the action sheet template is available for audio apps only starting with iOS 17. Your app will need to ensure it is only presented for users who are on iOS 17 and later.

Accepted Answer

Hi, the action sheet template is available for audio apps only starting with iOS 17. Your app will need to ensure it is only presented for users who are on iOS 17 and later.

Hello, Thanks for your prompt response!

It's strange that the documentation shows the CPActionSheetTemplate as being available in iOS 12, and the presentTemplate method in iOS 14.

Is there an alternative way to display a menu with a title and message in CarPlay for iOS 17 and prior?

I'm developing a CarPlay music app and encountering a crash when trying to present a CPActionSheetTemplate using presentTemplate on the CPInterfaceController in iOS 15.2. The app functions as expected on iOS 17*.
 
 
Q