Hi everyone!
I’m integrating push notifications for a taxi-driver app and ran into a blocking CarPlay issue.
When the iPhone is connected to CarPlay (wired or wireless), the push arrives on the phone without any sound and nothing is shown or announced on the CarPlay screen.
If I unplug CarPlay, the same push plays the default sound and shows a normal banner on the lock screen, so the payload itself looks valid.
Environment
- iPhone 13 Pro, iOS 18.0
- CarPlay head-unit: Xcode 16.2 CarPlay Simulator
- App built with Flutter 3.22 + firebase_messaging: ^15.2.5
- Deployment target: iOS 14.0
- Xcode capabilities enabled: Push Notifications, Time-Sensitive Notifications
- App settings on the device: Allow Notifications -› Sounds ON, Show in CarPlay ON
- Siri › Announce Notifications › CarPlay: master toggle ON + my app added to the allowed list
- Driving Focus = Off (same result if it’s On)
Native setup in AppDelegate.swift
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .sound, .badge, .carPlay]
) { _,_ in }
let carPlayCategory = UNNotificationCategory(
identifier: "CARPLAY_ORDER",
actions: [],
intentIdentifiers: [],
options: [.allowInCarPlay]
)
UNUserNotificationCenter.current().setNotificationCategories([carPlayCategory])
UNUserNotificationCenter.current().delegate = self
application.registerForRemoteNotifications()
APNs payload that I send via FCM
{
"aps": {
"alert": {
"title": "New test order",
"body": "Location info test"
},
"sound": "default",
"category": "CARPLAY_ORDER",
"interruption-level": "time-sensitive",
"relevance-score": 1
}
}
What could be the problem? Please help me solve the error