We have implemented Carplay in our voip based project and in this we have implemented Incoming call and chat notification feature for Carplay.
For Carplay we implemented siri.
Siri Object donated Successfully in Notification service Extension when notification didreceive method called.
Donation Code :-
func donateIncomingMessageIntent(sender: String, senderId: String, message: String, messageId: String, userInfo: [AnyHashable: Any],destination:String) {
// Create proper name components
clearAllinteraction()
var nameComponents = PersonNameComponents()
nameComponents.givenName = sender
//unknown
let senderPerson = INPerson(
personHandle: INPersonHandle(value: senderId, type: .unknown),
nameComponents: nameComponents,
displayName: sender,
image: nil,
contactIdentifier: senderId,
customIdentifier: "sender_\(senderId)"
)
let recipientPerson = INPerson(
personHandle: INPersonHandle(value: "me@example.com", type: .emailAddress),
nameComponents: nil,
displayName: "Me",
image: nil,
contactIdentifier: "me_id",
customIdentifier: "user_id"
)
let inMessage = INMessage(
identifier: messageId,
conversationIdentifier: "conversation_\(senderId)",
content: message,
dateSent: Date(),
sender: senderPerson,
recipients: [recipientPerson],
groupName: nil,
messageType: .text
)
let intent = INSearchForMessagesIntent(
recipients: [recipientPerson],
senders: [senderPerson],
searchTerms: [message],
attributes: .unread,
dateTime: nil,
identifiers: [messageId],
notificationIdentifiers: [messageId],
groupNames: ["Messages"]
)
let interaction = INInteraction(intent: intent, response: nil)
interaction.identifier = "message_\(messageId)"
interaction.direction = .incoming // Add direction
DispatchQueue.global(qos: .userInitiated).async {
interaction.donate { error in
if let error = error {
print("❌ Failed to donate INSearchForMessagesIntent: \(error.localizedDescription)")
} else {
print("✅ Donated INSearchForMessagesIntent successfully!")
let intentData: [String: Any] = [
"senderName": sender,
"senderId": senderId,
"message": message,
"messageId": messageId,
"timestamp": Date().timeIntervalSince1970,
"conversationId": "conversation_\(senderId)", // Add conversationId
"destination":destination
]
let defaults = UserDefaults(suiteName: "group.com.chatapp") // 🔁 Use your App Group ID
defaults?.removeObject(forKey: "lastCarPlayIntentData")
defaults?.set(intentData, forKey: "lastCarPlayIntentData")
defaults?.synchronize()
}
}
}
}
Here SenderID is like 3000@abc,2000@abc etc.
In siri ,When we handle INSearchForMessagesIntent at that time all data getting from Userdefaults because without Userdefaults INSearchForMessagesIntent value nil.
Even we enabled announcement using .allowAnnouncement.
We also tried to save same sender in contact Book because sometime siri search contact and not found then may be raise this type of issue.
So we need code level support for read incoming message in carplay when notification comes.
Thank you.
Posts under CarPlay tag
170 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
It looks like I'm one of the rare developers dealing with CarPlay...
I develop a CarPlay extension for my apps. A few things:
especially when using the CarPlay I/O window in iOS Simulator, I get random selection highlightning for list items: I have three list templates in a tab template; once I reselect a list using the tab which has been selected before, the initial list item highlights / returns to normal every refresh of the list content; while this doesn't happen for my real world Sony CarPlay device, I'd rather not see such disturbing highlighting for my users. I do not update the template structs or items here, it is just content like text of detailText I update. Question: how to remove highlightning programmatically - especially for devices with touch screen?
I have one user who reports auto-selection of UI elements while driving; I assume this is some problem with his touch screen, but it may be a general issue too. Question: anyone with similar observations
connecting my iPhone to the stand-alone Car Play simulator doesn't work; I had it working before, so it might be related to a recent iOS beta...
Any hints / observations are welcome. The CarPlay community really seems to be small and I'd like to hear other's experience on the named items.
In my CarPlay app, I am hiding the navigation bar by using the following:
self.mapTemplate?.automaticallyHidesNavigationBar = true
self.mapTemplate?.hidesButtonsWithNavigationBar = false
I don't want the navigation bar to show unless a user interacts with the map by tapping it.
Strangely, when I present a CPNavigationAlert the navigation bar will often appear and then disappear after the alert is dismissed.
Is there a setting or reason that the navigation bar would be appearing when presenting this alert? I would like to keep the nav bar hidden during this time.
I am building a CarPlay navigation app and I would like it to be as hands free as possible.
I need a better understanding of how Siri can work with CarPlay and if the direction I need to go is using Intents or App Shortcuts.
My goal is to be able to have the user speak to Siri and do things like "open settings" or "zoom in map" and then call a func in my app to do what the user is asking.
Does CarPlay support this? Do I need to use App Intents or App Shortcuts or something else?
I'm working on adding CarPlay support to an audio app and am running into an issue. Occasionally, when a user opens the app from CarPlay while the main app scene is either not connected or is currently in the background, I will receive an error when attempting to activate the audio session. The code below mimics my setup:
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .spokenAudio)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print(error) // NSOSStatusErrorDomain - 560557684: Session activation failed
}
That error code maps to AVAudioSession.ErrorCode.cannotInterruptOthers.
Once in this state, all subsequent attempts to play different pieces of content will fail. However, things will start working normally if the user opens the app on their phone and tries again from CarPlay (while the app is in the foreground on their phone).
I'm not sure why it would behave this way and want to note that I do have the audio background mode capability enabled.
Has anyone else encountered this? Are there any workarounds or changes I could make to prevent this from happening?
CarPlay woes. I think it's unacceptable that it silently kills an ongoing WiFi connection that has been established using ASAccessoryKit and NEHotspotHelper which is in active use.
This is responsible for angry clients because their processes break a lot when they are in reach of the connected car. (And yes, they have to be in the reach of the car, because it is a diagnostic/maintenance app for cars…)
Do I really need to ask my clients to unpair from CarPlay before using our app or is there another way?
My app crashed on iOS 18.1 only, here is the crash log:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'BUG IN CLIENT OF UIKIT: <CPTemplateApplicationScene: 0x1114bb780> -[UIScene _registerSettingsDiffActionArray:forKey:]: Registering the scene itself results in a retain cycle.'
And I found this post: https://mastodon.social/@marcoarment/113280078320422999
Is this a system bug in iOS 18.1 beta 5?
After users upgraded to iOS18.5 beta2, they began to give many feedback on the following issues:
When you switch tab, the interface is blank.
Find out the reason. The method of clicking tab no longer responds. Is this a system bug?
Hope this problem can be solved as soon as possible
Hello,
When my mobile app is terminated, say 30 secs later the CarPlay app stops working. I don't get the access token that is saved in the KeyChain. The same happens when my mobile app is in background for more than 20 secs or so.
Please suggest the way forward. Or is this the expected behavior?
Hello,
I have used CPPointOfInterestTemplate for displaying data and as user scrolls using the up/down arrow, I do not see any change in the map. Is there a way to highlight the POIs as the user scrolls through the list?
I need to use the map controls and zoom to check the markers on the map. Is it possible to set the zoom level of the map in CarPlay?
Pls suggest on the above queries
I am currently developing a CarPlay application using CPPointOfInterestTemplate.
I am displaying a list of restaurants on a map, and when a user taps on a restaurant in the list, I present a detail view using CPPointOfInterest.
The list of restaurants is updated based on the user's location changes using the setPointsOfInterest method.
Is there a way to detect when they press the close button (typically an "X" button) to dismiss the detail view and return to the list?
Is there a delegate method or any other mechanism to determine whether the CPPointOfInterestTemplate is currently displaying the list of points of interest or the detail view of a specific point of interest? I need to know this so that I can avoid updating the list based on location changes when the detail view is being shown.
My current implementation updates the list of restaurants whenever the user's location changes. This works well when the user is Browse the list. However, if the user has navigated to the detail view of a restaurant, a location update currently causes the list to reload, which results in the detail view being dismissed and the user being taken back to the list. I would like to prevent this from happening and only update the list when the list view is visible.
Hi everyone,
I applied for CarPlay Entitlements on [Date 4. 26, 2025] using.
(*CarPlay Entitlements Case-ID : 13045151)
I haven't received any updates or responses regarding my application yet. It's been 7 days since the application.
My service requires CarPlay integration with a Black Box device. The primary purpose of this integration is to allow users to configure device settings through CarPlay.
Furthermore, we plan to utilize the "Communication" category of Entitlements to notify users of parking incidents detected by the Black Box device while parked. This functionality is crucial for alerting drivers to potential issues affecting their vehicles.
Could anyone share their experience with the typical turnaround time for CarPlay Entitlements, especially for applications involving device integration and the "Communication" category? Is this delay normal?
Is there any way to check the application status or contact the appropriate team to inquire about its progress?
Thank you for any insights or advice you can provide!
Sincerely,
I have CarPlay enabled for my app (CarPlay Audio App (CarPlay framework), CarPlay Audio App (Media Player framework)) and the lessons I'm following suggest I need to add CarPlay as an application extension to my app in Xcode (My Project -> Targets -> My App -> '+' -> iOS Application Extension) but CarPlay is not an option as an extension. Has this step been deprecated or am I missing something in Xcode (this is my first app so yeah there's that).
I read this doc and find some key info.
https://developer.apple.com/carplay/documentation/CarPlay-App-Programming-Guide.pdf
CarPlay app entitlements
All CarPlay apps require a CarPlay app entitlement that matches your app type. To request a CarPlay app entitlement, go to http://developer.apple.com/carplay and provide information about your app, including the type of entitlement that you are requesting. You also need to agree to the CarPlay Entitlement Addendum.
Apple will review your request. If your app meets the criteria for a CarPlay app, Apple will assign a CarPlay app entitlement to your Apple Developer account and notify you.
But I still have questions about the old and new CarPlay.
// About account permission
I have 2 Apple developer accounts.
Account A (normal dev account):
Here our app already supports the old-style CarPlay UI. (before iOS14)
And I can see there are "CarPlay Messaging App" and "CarPlay VoIP Calling App" in the "Additional Capabilities" tab in my Identifier.
Account B (Enterprise account):
I can see there is a "CarPlay Communication App" in the "Additional Capabilities" tab in my Identifier. But I don't know (or don't remember) if I have requested this new CarPlay entitlement for this account.
Quesiton 1: If I want to refactor my current CarPlay app (from old UI to new UI [iOS14 support]), Do I need to request the CarPlay entitlement for Account A?
Because I can not find the "CarPlay Communication App" in Account A portal(or via Xcode).
// About New CarPlay UI
In the old UI, there are just 2 buttons showing after user tap the App icon now.
One is for message and the other one is for VoIP call.
But I can see only one VoIP call button in the new CarPlay UI, no seperated message button.
Question2: Can I add a message button? If no, how to implement a similiar user experience.
Thanks.
We are currently working on a CarPlay navigation app and so far everything is working well except for speaking turn notifications.
Our TTS implementation works fine on the phone and works fine on CarPlay if the voice is spoken over the speaker in the car. If users connect a BT headset to the car and listen through that headset, then the voice commands are chopped up / stutter.
Why would users use BT headset? Well, we are working on a motorcycle app, and there are no speakers usually on a motorcycle.
It sounds like the BT channel is opened and closed repeatedly for every character / word spoken. This happens on different CarPlay devices and different Bluetooth headsets, we have reports from multiple users that they find this behavior annoying and that other apps work fine.
Is this a known issue? Are there possible workaround?
I have a SwiftUI app - (https://youtu.be/VbAfUk_eYl0?si=JxUBh0Bpb-vc1E1U) - which I thought was almost ready for release - a manager for airdropped audio files from Logic Pro or other music creation applications. It uses AVAudioEngine and AVAudioPlayerNode to play audio, and the MediaPlayer API to integrate with car audio and similar, all of which works well.
It does not currently have an explicit CarPlay integration (and I'm slightly horrified at the amount of work that is going to require).
I had the good or bad luck of getting a loaner car with carplay while mine is being repaired yesterday, and lo and behold, when connected to the vehicle via CarPlay, there is no audio output in the vehicle at all. The now playing panel correctly shows the information my app provides about the currently playing song; the player node believes it is playing, the AVAudioSession is configured as it should be. But there is no sound.
Obviously I cannot ship it in this state.
I've tried fiddling with the parameters the AVAudioSession is configured with, in case there was some parameter that was preventing audio output, to no avail - currently:
var options = AVAudioSession.CategoryOptions()
options.insert(.allowAirPlay)
options.insert(.allowBluetooth)
options.insert(.allowBluetoothA2DP)
try session.setCategory(.playback, mode: .default, options: options)
try? session.setPreferredIOBufferDuration(0.002) // ~96 samples at 44.1kHz
try? session.setPrefersNoInterruptionsFromSystemAlerts(true)
try? session.setPrefersInterruptionOnRouteDisconnect(false)
try session.setActive(true, options: [.notifyOthersOnDeactivation])
All diagnostics within the app show the player operating correctly - files are played and flushed; AVAudioPlayerNodeCompletionCallbacks are called when they should be. But the output is not audible in the vehicle.
I would much prefer to ship this app without full-blown CarPlay integration, but with working audio when connected via CarPlay, and work on full CarPlay integration for the next release.
Is there some secret handshake I am just missing to make this work?
Hello all,
I have a food delivery app that I am beginning to implement CarPlay support in. Route picking, navigation, turn-by-turn guidance features all work perfectly on iPhone, and on CarPlay while the iPhone is unlocked, or locked but screen on.
However, when the iPhone is locked and the screen is off, the CarPlay map view stops following the user's location and appears to be frozen. When this happens, the other "map buttons" that are part of the CPMapTemplate continue to accept user input (I can enter and exit the map panning mode for example), the user's location continues to update, and the turn-by-turn guidance continues as normal. It appears to be just the map view (which is drawn on the window and is not part of the CPMapTemplate) that stops updating in this state.
I've been through every page of Apple documentation on CarPlay but nothing references or addresses how to keep the CarPlay session active while the iPhone is locked. I'm not sure where else to look for answers and I'm out of theories as to why this might happen.
Any guidance around this would be greatly appreciated.
Hello everyone, I'm developing a radio app and I want to add CarPlay. Before starting the program I requested all the necessary permissions and they were accepted. Now when I run the app, emulate CarPlay and try to access the app, it crashes and gives me this log:
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Application does not implement CarPlay template application lifecycle methods in its scene delegate.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804b70ec __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018008ede8 objc_exception_throw + 72
2 CoreFoundation 0x00000001804b6ffc -[NSException initWithCoder:] + 0
3 CarPlay 0x00000001bc830ee8 -[CPTemplateApplicationScene _deliverInterfaceControllerToDelegate] + 704
4 CarPlay 0x00000001bc82fa60 __64-[CPTemplateApplicationScene initWithSession:connectionOptions:]_block_invoke.4 + 116
5 CoreFoundation 0x00000001803e9aec CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 120
6 CoreFoundation 0x00000001803e9a24 ___CFXRegistrationPost_block_invoke + 84
7 CoreFoundation 0x00000001803e8f14 _CFXRegistrationPost + 404
8 CoreFoundation 0x00000001803e88f0 _CFXNotificationPost + 688
9 Foundation 0x0000000180ee2350 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
10 UIKitCore 0x0000000184f0a8e4 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1152
11 UIKitCore 0x0000000185aa445c -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 808
12 UIKitCore 0x0000000185aa470c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 304
13 UIKitCore 0x0000000185573c08 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 260
14 FrontBoardServices 0x0000000187994ce4 __95-[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:]_block_invoke + 260
15 FrontBoardServices 0x00000001879950a4 -[FBSScene _callOutQueue_coalesceClientSettingsUpdates:] + 60
16 FrontBoardServices 0x0000000187994b64 -[FBSScene _callOutQueue_didCreateWithTransitionContext:alternativeCreationCallout:completion:] + 408
17 FrontBoardServices 0x00000001879c1d50 __93-[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:]_block_invoke.156 + 216
18 FrontBoardServices 0x00000001879a1618 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 160
19 FrontBoardServices 0x00000001879c0220 -[FBSWorkspaceScenesClient _callOutQueue_sendDidCreateForScene:transitionContext:completion:] + 388
20 libdispatch.dylib 0x0000000103e127b8 _dispatch_client_callout + 16
21 libdispatch.dylib 0x0000000103e163bc _dispatch_block_invoke_direct + 388
22 FrontBoardServices 0x00000001879e4b58 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 44
23 FrontBoardServices 0x00000001879e4a34 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 196
24 FrontBoardServices 0x00000001879e4b8c -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 24
25 CoreFoundation 0x000000018041b324 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
26 CoreFoundation 0x000000018041b26c __CFRunLoopDoSource0 + 172
27 CoreFoundation 0x000000018041a9d0 __CFRunLoopDoSources0 + 232
28 CoreFoundation 0x00000001804150b0 __CFRunLoopRun + 788
29 CoreFoundation 0x0000000180414960 CFRunLoopRunSpecific + 536
30 GraphicsServices 0x0000000190183b10 GSEventRunModal + 160
31 UIKitCore 0x0000000185aa2b40 -[UIApplication _run] + 796
32 UIKitCore 0x0000000185aa6d38 UIApplicationMain + 124
33 SwiftUI 0x00000001d1e2eab4 $s7SwiftUI17KitRendererCommon33_ACC2C5639A7D76F611E170E831FCA491LLys5NeverOyXlXpFAESpySpys4Int8VGSgGXEfU_ + 164
34 SwiftUI 0x00000001d1e2e7dc $s7SwiftUI6runAppys5NeverOxAA0D0RzlF + 84
35 SwiftUI 0x00000001d1b70c8c $s7SwiftUI3AppPAAE4mainyyFZ + 148
36 streamz.debug.dylib 0x0000000106148e98 $s7streamz7StreamzV5$mainyyFZ + 40
37 streamz.debug.dylib 0x0000000106148f48 __debug_main_executable_dylib_entry_point + 12
38 dyld 0x00000001032d9410 start_sim + 20
39 ??? 0x000000010301a274 0x0 + 4345406068
I also get this error in the 'App' protocol:
Thread 1: "Application does not implement CarPlay template application lifecycle methods in its scene delegate."
If you need anything specific to figure out what it's about, I'll be happy to help.
Hello,
I've been banging my head against this for a couple of days now
I can't get the CarPlay interface to work on my music app
I see the error: Application does not implement CarPlay template application lifecycle methods in its scene delegate
I've checked the sample code and developer guides and can't see my mistake
My CarPlay delegate code is:
class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
var interfaceController: CPInterfaceController?
var carPlayWindow: UIWindow?
private let playerManager = MusicPlayerManager.shared
private var playlists: MusicItemCollection<Playlist> = []
// MARK: - CPTemplateApplicationSceneDelegate Methods
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
didConnect interfaceController: CPInterfaceController) {
// Store reference to the interface controller to use throughout the app
self.interfaceController = interfaceController
// Request Apple Music authorization if needed
requestMusicAuthorization()
// Configure the interface with the now playing template and specified tabs
setupCarPlayInterface(interfaceController)
}
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
didDisconnectInterfaceController interfaceController: CPInterfaceController) {
// Clean up when CarPlay disconnects
self.interfaceController = nil
print("CarPlay disconnected")
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state
print("CarPlay scene became active")
}
etc
My info.plist contains:
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>CPTemplateApplicationScene</string>
<key>UISceneConfigurationName</key>
<string>TemplateSceneConfiguration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
My one doubt is this entry in the plist: UISceneConfigurationName as I can't find any clarity in the docs how to use or implement this
Can anyone suggest where I need to be looking?
Thanks for your help!
iPhone:
iPhone 12 pro max, iOS:18.3.1
Step:
Connect CarPlay to my car, after connection success, CarPlay screen is black.
This issue only happens of first time connection;
I have asked OEM factory, they told me because of my iOS version is larger than 17.5, and above this version, will have this issue.
So, I need your help to figure problem and update in new version.