Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

CPInformationTemplate custom back button (CPBarButton) not working on iOS 16 but works on iOS 18

I'm trying to implement a custom back button in a CPInformationTemplate using CPBarButton. It works as expected on iOS 18 — the button appears in the navigation bar and correctly pops the template when tapped.

However, on iOS 16 devices, the custom back button does not respond to taps at all.

The reason I need a custom back button is because I want to perform cleanup and reset logic before popping the template.

Is there any workaround for making this work on iOS 16? Or is there a recommended way to hook into the system back button behavior so that I can execute code when the template is dismissed?

Answered by Frameworks Engineer in 840905022

Hi, there was a known issue here in iOS 16. As a workaround, you could observe -[CPInterfaceControllerDelegate templateWillAppear:] to see when the template before your information template becomes visible, which would happen by way of the user tapping the back button. It should also be called if your app programmatically dismisses the information template.

Accepted Answer

Hi, there was a known issue here in iOS 16. As a workaround, you could observe -[CPInterfaceControllerDelegate templateWillAppear:] to see when the template before your information template becomes visible, which would happen by way of the user tapping the back button. It should also be called if your app programmatically dismisses the information template.

CPInformationTemplate custom back button (CPBarButton) not working on iOS 16 but works on iOS 18
 
 
Q