I was able to get this to work by configuring the following:
You have to setup a notification category with .allowInCarPlay option. Then use the category name in the notification's categoryIdentifier field.
let category = UNNotificationCategory(identifier: "CarPlay", actions: [], intentIdentifiers: [], options: [.allowInCarPlay])
UNUserNotificationCenter.current().setNotificationCategories([category])
and also .carplay option when sending the notification:
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge, .carPlay])
Topic:
App & System Services
SubTopic:
General
Tags: