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];

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

Add a Comment

Accepted Reply

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.

  • below iOS17, how can i present a template?i try to use CPAlertTemplate, but it can only show one button. how can i present a alert witn multiple action, just like apple music. 😭😭😭

Add a Comment

Replies

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.

  • below iOS17, how can i present a template?i try to use CPAlertTemplate, but it can only show one button. how can i present a alert witn multiple action, just like apple music. 😭😭😭

Add a Comment