CarPlay present CPActionSheetTemplate Crash

Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unsupported object <CPActionSheetTemplate: 0x2819a4480> <identifier: CD077C44-7F3F-46CC-B713-35A0259124EA, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to presentTemplate:animated:completion:. Allowed classes: {( CPAlertTemplate, CPVoiceControlTemplate, CPGridTemplate, CPListTemplate, CPNowPlayingTemplate, CPTabBarTemplate )}'

[[NMCarPlayEventManage shareManage].carplayInterfaceController dismissTemplateAnimated:NO]; [[NMCarPlayEventManage shareManage].carplayInterfaceController presentTemplate:sp animated:YES];

Answered by Frameworks Engineer in 782854022

Is your app a Driving Task CarPlay app? If so, the action sheet is available in that category of app only beginning with iOS 17. Your app will need to ensure the action sheet is presented only for users who are running iOS 17 or later.

it works fine on iOS17. it crash on iOS 16.x

Accepted Answer

Is your app a Driving Task CarPlay app? If so, the action sheet is available in that category of app only beginning with iOS 17. Your app will need to ensure the action sheet is presented only for users who are running iOS 17 or later.

CarPlay present CPActionSheetTemplate Crash
 
 
Q