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
Looked at a previous embeddedcapabilities and the current one being generated and we see CarPlay Navigation App enabled. Since our app was no longer being considered as an audio app, we could not attach the CPNowPlayingScreenTemplate
force a rebuild now that capabilities have been updated to the ones we had