CPTabBarTemplate has a bug when set root template?

my app is for music app and target deployment is iOS 14.

I wrote a code for developing CarPlay like this,

let tabbarTemplate = CPTabBarTemplate(template: someTemplates)
try await interfaceController.setRootTemplate(tabBarTemplate, animated: false)
print("here's after set root template")

the print not called. even breakpoint not working. I guess it's not working because of the completion handler is not called.

but after change the code like (for test),

let listTemplate = CPListTemplate(title: title, sections: sections)
try await interfaceController.setRootTemplate(listTemplate, animated: false)
print("here's after set root template")

the print called. and breakpoint also works.

is this a bug ??

is there a way to receive completion after set CPTabBarTemplate as root template?

Answered by Frameworks Engineer in 752995022

Hello! There was a known issue here, specific to the tab bar template, but it should have been resolved with iOS 16.3. Can you confirm whether you are still seeing this behavior on iOS 16.3 or newer?

Accepted Answer

Hello! There was a known issue here, specific to the tab bar template, but it should have been resolved with iOS 16.3. Can you confirm whether you are still seeing this behavior on iOS 16.3 or newer?

CPTabBarTemplate has a bug when set root template?
 
 
Q