[CarPlay] CPNowPlayingTemplate not being accepted when being passed to pushTemplate:animated:completion

Hey team,

I have an app in CarPlay where i was pushing the CPNowPlayingTemplate as follows:

self.interfaceController.pushTemplate(CPNowPlayingTemplate.shared(), animated: true) 

This used to work perfectly, but suddenly I have started to get this error

NSInvalidArgumentException: Unsupported object <CPNowPlayingTemplate: 0x119a0b5c0> <identifier: 6EE4E5A9-B1FB-4341-A485-78D7DDEBD8D0, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to pushTemplate:animated:completion:. Allowed classes: {(
    CPActionSheetTemplate,
    CPAlertTemplate,
    CPVoiceControlTemplate,
    CPTabBarTemplate,
    CPListTemplate,
    CPInformationTemplate,
    CPContactTemplate,
    CPMapTemplate,
    CPGridTemplate,
    CPSearchTemplate
)}

How is this possible? Even on Apple docs, it says to pushTemplate

Refer

Note:

I have a max of 3 templates going on:

  • Home screen
  • Album screen with all songs
  • NPS now playing screen

I have the following entitlement also:

com.apple.developer.carplay-audio

Note: The issue is not reproducible on local xCode but when i deployed to appStore it started showing this exception.

[CarPlay] CPNowPlayingTemplate not being accepted when being passed to pushTemplate:animated:completion
 
 
Q