yup, works for me. The protocol string you specified in the entitlement file must also be specified in the CarPlay Simulator under Configuration -> Automaker Apps
Post
Replies
Boosts
Views
Activity
Assuming you are building an automaker app, specify the protocol in the entitlement file under "com.apple.developer.carplay-protocols", then in CarPlay Simulator, goto Configuration -> Automaker Apps and specify the same protocol string
we got it working with enterprise app
Try this:
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 requesting notification authorization:
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge, .carPlay])
and set "CarPlay" for the categoryIdentifier in the push payload (it can be any string, just need to match what you used in UNNotificationCategory.
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])