Add CarPlay support to your navigation app using CarPlay.

Posts under CarPlay tag

112 Posts

Post

Replies

Boosts

Views

Activity

Entitlement "com.apple.developer.carplay-driving-task" not allowing audio playback for voice controlled interaction
According to https://developer.apple.com/download/files/CarPlay-Developer-Guide.pdf , apps with entitlement com.apple.developer.carplay-driving-task are allowed to use voice control. In my current implementation the voice recording working fine but the voice response (AVPlayer with category "playback set") does not output any audio. I suspect that it is a entitlement limitation because if I quickly tap to play a music while the voice assistant AVPlayer is "playing", then I can hear the response, but without this trick it stays playing but mute. In parallel I have now requested com.apple.developer.carplay-voice-based-conversation entitlement , but I don't even know if when approved I will be able to use 2 entitlement for the same CarPlay app. Long story short: 1 - Should an app be able to play audio responses when it's CarPlay entitlement is com.apple.developer.carplay-driving-task? 2 - If not, can I combine entitlements com.apple.developer.carplay-driving-task and com.apple.developer.carplay-voice-based-conversation?
2
0
752
1d
Inconsistent CarPlay Audio Routing: Residual WebKit AudioContext Causes Stuttering in Third-Party Audio Apps via Wireless CarPlay
Environment: OS: iOS 16.0 and later (up to iOS 17.x / 18 beta) Subtopic: CarPlay (Wireless / Wi-Fi & Bluetooth Link) Frameworks: WebKit (WKWebView), AVFAudio (AVAudioSession), CoreAudio Description : We have encountered a critical audio routing and scheduling anomaly specific to Wireless CarPlay environments when a WKWebView leaves a residual AudioContext instance. In our iOS application, we embed an H5 page that utilizes the Web Audio API (AudioContext) to handle audio playback, which includes standard user-interaction-based mute unlocking logic. Under normal conditions (including standalone device playback, Bluetooth A2DP, and Wired CarPlay), if the H5 page is dismissed without explicitly invoking AudioContext.close(), the system handles resource recycling gracefully without side effects. However, exclusively under a Wireless CarPlay connection, if the H5 page is destroyed but the WebKit AudioContext instance remains active or is not explicitly closed by the frontend script, a severe system-level audio scheduling conflict occurs. This anomaly breaks the audio pipeline behavior, causing persistent stuttering, dropped frames, and intermittent audio dropping in concurrent third-party music applications (such as KuGou Music, Spotify, etc.). Observed Behavior & Technical Analysis: Wireless CarPlay Specificity: The issue cannot be reproduced on Wired CarPlay or standard Bluetooth audio routing. This suggests that the CarPlay audio server daemon over Wi-Fi (AirPlay-based transport mechanism) has a different constraint or synchronization mechanism regarding audio graph changes. AudioSession / Audio Graph Contention: It appears that when AudioContext is alive, WebKit maintains an active AVAudioSession or an unreleased node in the system audio graph. When the app switches context or destroys the webview wrapper, the system fails to force-evict or deactivate this residual context under Wireless CarPlay scheduling rules. Resource Starvation for Background Apps: The persistent, phantom audio node induces scheduling friction or thread starvation in the CarPlay audio routing daemon, manifesting as severe buffering/stuttering in whatever third-party audio app currently holds the primary AVAudioSession mixable/non-mixable slot. Questions for Apple Engineers : Root Cause of Wireless CarPlay Routing Discrepancy: Why does the CarPlay audio routing daemon handle unreleased WebKit AudioContext nodes differently over Wireless CarPlay compared to Wired CarPlay and native device endpoints? Is there an underlying lock or stream synchronization issue within the wireless CoreAudio server pipeline? Native iOS Client Side Mitigation/Fallback: Is there an recommended pattern for the native iOS app wrapper (WKWebView container) to forcefully invalidate or tear down WebKit-initiated AudioContext sessions upon view dismissal, ensuring a foolproof fallback even if the H5 frontend fails to call .close() properly? Best Practices for Web Audio + CarPlay Integration: Are there any specific AVAudioSession.CategoryOptions or WebKit configurations we should enforce to prevent a background H5 page from interfering with the system-wide CarPlay audio scheduling? Any insights, workarounds, or documentation pointers from the CoreAudio or CarPlay teams would be greatly appreciated. Thanks!
0
0
56
1d
CarPlay: CPListItem.image degrades to placeholder glyph mid-session, only iPhone reboot recovers — FB22828125
Posting here in case other CarPlay developers are hitting the same thing, and to give Apple engineers a forum-side reference for the radar. Filed as FB22828125. Symptom In a CarPlay app using CPListTemplate, UIImage instances assigned to CPListItem.image start rendering as the system placeholder glyph after extended CarPlay use (several hours to a few days of cumulative session time). Text labels and accessory chevrons still render correctly — only the leading image is affected, and it affects every visible template surface at once. Known recovery Once the failure starts, it survives: Killing and relaunching the app Force-quitting and relaunching from CarPlay itself Disconnecting and reconnecting CarPlay The only known recovery is rebooting the iPhone. After reboot, the same code path renders correctly again — until the failure reoccurs. App-side ruling-out UIImage instances passed to CPListItem.image are non-nil at failure time (verified by assertions) Each template rebuild calls UIGraphicsImageRenderer afresh from UIImage(systemName:) — no caching of UIImage across rebuilds Images are baked via withTintColor(_:renderingMode: .alwaysOriginal) then rasterized, so CarPlay receives a finished bitmap rather than a template image relying on its tinting pipeline Same code path renders correctly on launch and for hours afterward — the input bytes are identical before and after the failure boundary Because the failure survives both the app process and the CPTemplateApplicationScene teardown, the corrupted state appears to live in an iOS system process rather than in the app or the CarPlay session. Question for the forum Is there a known workaround on the app side — a different image-supply API, or a way to force the CarPlay rendering pipeline to invalidate its cache without an iPhone reboot?
3
0
207
5d
CPPointOfinterestTemplate : How to get the event for "X"/Close button
Hi, I am using the CPPointOfinterestTemplate and wanted to change the trailingNavigationBarButtons when the user navigate to detail screen(This is done with the help of didSelectPointOfInterest delegate function). However i could not find any documentation on resetting the trailingNavigationBarButtons when the user click on the "X"/Close button on the details screen. Can you explain if there is any way i can handle my
0
0
100
1w
CarPlay Function lost (26.4 and 26.5 DB)
with the latest updates on two of our iPhones run running 26.4 and the other 26.5 developed beta we have lost the ability to use CarPlay functionality via the Apple certified cable. Both phone showed the phone is connected and it is charging however functionality are greyed out on display in the 2022 Nissan rogue. Bluetooth still function properly as you could send and receive calls. However, functionality via the cable does not work. You cannot play music either. this feature also greyed. A trip to the Nissan dealer for more troubleshooting provided the following. A version 15 iPhone Connect via usb-c cable and functioned properly. As well as an android device. But again, hook up two iPhones one with version 26.5 DB and the other 26.4 both iPhone 14 would not work. After we left the dealership, I had a hunch that the issue with the latest update that both of these phones received over last week. I came home and connected an iPhone 6S which has a much older software version and it connected to CarPlay displayed maps and played music. Hopefully we can get another update soon that will resolve the issue via the lightning cable connection.
2
1
754
1w
audiomxd PVM misclassifies CarPlay head unit as BTHeadphones — CarPlay never activates despite successful iAP2 auth
iPhone 16 Pro, iOS 26.5 (23F77), Nissan Sentra 2022, USB-C wired CarPlay. CarPlay fails every attempt despite the iAP2 handshake completing successfully. Same cable + same car works with a different iPhone. After digging through sysdiagnose logs I found the root cause in audiomxd. The head unit's Bluetooth MAC (BC:42:8C:B8:06:AF) is permanently stored in the PVM as HeadphonesBT: PVM: Route [58] = HeadphonesBT~BC:42:8C:B8:06:AF This causes FigRoutingManagerProcessCustomizedRouting to return: isPortOfTypeCarPlayAtIndex = NO modelID = BTHeadphones4236,19521 And vaemProcessCarPlayCustomizedRouting never adds a starkPort: portsToAdd[0] = AirPlayHandoffDevice portsToAdd does NOT contain a starkPort Without a starkPort the audio routing never activates. The endpoint gets published under endpointManager=Bluetooth as BluetoothHFPInput/Output instead of CarPlay. Disconnect follows with errors -16723 and -16617. This survives Forget Device, Forget Car, Reset Network Settings, and reboots. The only thing that clears it is Reset All Settings. Two questions: Is there a supported way to purge audiomxd's PVM for a specific MAC address without Reset All Settings? 2. Is BTHeadphones4236,19521 a known misclassification for Nissan head units in iOS 26? Sysdiagnose attached to Feedback Assistant report FB22815215.
0
0
283
1w
CarPlay Simulator not Working
I am trying to run my navigation app on a physical device, and want to view it using CarPlay Simulator (through XCode additional tools, NOT Hardware->Display->CarPlay), however, when I try to use the app, device has a Red dot next to it, and the simulator shows nothing. What I've tried: Running on a real CP device(my car): App works as intended, but want to run simulator so I can have live debugging Forgetting CP device and reconnecting All Steps of "Troubleshooting CP Simulator" (Updating to latest iOS, restarting phone, turn off hotspot, not connected to any other CP devices, ensure Firewall allows incoming connections) Tried both Xcode 13 CP sim and Xcode 14 beta CP sim Tried both work and personal laptops/phones Ideas: I am running on a M1 laptop, which could be messing with something. I am also running my Xcode in Rosetta(app has packages that cannot compile without Rosetta), but I don't believe this should be a problem because I am running on a physical device not Xcode simulator. Also can't run on Hardware->Display->CarPlay because of Application does not implement CarPlay template application lifecycle methods in its scene delegate and I can't figure out how to fix ("EXCLUDED_ARCHS[sdk=iphonesimulator*]"= "arm64" does not work)
8
6
6.5k
2w
Detect if a widget is displayed in CarPlay vs. iPhone/iPad
I am looking into the new CarPlay support for systemSmall widgets introduced in iOS 26 (Apple documentation). I am trying to figure out if there is a way to programmatically detect whether the widget is currently being displayed on the iPhone/iPad home/lock screen or in CarPlay. So far, I haven’t found any information in the documentation or APIs that indicate how to distinguish between these environments. Is there an API, environment value, or best practice for handling this scenario? Thanks in advance for any insights!
2
1
510
2w
CarPlay Display Issue: Missing Images After Extended Navigation
I am experiencing a persistent issue with my CarPlay application where images rendered within the CarPlay Template interface disappear after the application has been used for an extended period, typically during prolonged navigation. Images used directly within the CarPlay Template framework disappear. In the attached image showing the issue (IMG_1022.PNG), you can see that the icons for 'parking', 'gasstation', 'conveniencestore', and 'favoritespot' are missing. The side bar icons (car, battery, etc.) remain visible, and the text labels are present, but the Template-specific images/icons vanish. Problem Description Images displayed on a custom UIViewController remain visible. Some of our screens integrate a UIViewController (e.g., for map display), and any images rendered on that view controller (not the template itself) continue to display correctly without issue. Example Images IMG_1021.PNG (Normal/Correct Display): This image shows the SearchMenu screen with all icons displayed correctly next to their respective labels ('word', 'home', 'route', 'history', 'parking', 'gasstation', 'conveniencestore', 'favoritespot'). IMG_1022.PNG (Problem State): This image shows the same screen after prolonged use, where the icons next to 'parking', 'gasstation', 'conveniencestore', and 'favoritespot' have disappeared, leaving only the text labels. Question Has anyone encountered a similar issue? This seems to be a rendering or resource management problem specific to images within the CarPlay Template components when the application runs for an extended duration.
2
0
293
2w
CarPlay HID transport buttons remap to call-control during continuous mic capture (no opt-out API)
Hello, I am developing Uniq Intercom, a voice-only group communication app for motorcyclists (always-on intercom over WebRTC, used continuously for multi-hour rides). I am seeking guidance on an iOS audio session and CarPlay HID interaction I have not been able to resolve through documented APIs. Problem: As soon as my app activates the microphone (yellow recording indicator visible), iOS appears to classify the app as a real-time communication participant and CarPlay re-routes the steering-wheel / handlebar HID transport buttons (left / right / ok) from the media-control role to the call-control role (answer/decline). Because I do not register a CallKit / LiveCommunicationKit call (the session is a continuous group voice channel, not a discrete telephony call), there is no call object for those buttons to act upon — they effectively become inert. Why this matters: Motorcyclists rely on the intercom for 4–6 hour rides. CarPlay is now built into a growing number of modern motorcycles and with aftermarket display units virtually any bike, and any rider who uses any voice communication platform alongside it — Uniq Intercom, WhatsApp Call currently runs into this same handlebar button remap. With the buttons inert, the rider's only remaining option is to reach for the motorcycle's touchscreen to skip a track or change navigation — this is unsafe. The exact same remap behavior occurs during a real WhatsApp or Phone call — but for those the remap is correct (answer/decline maps to a real call). For continuous voice apps without a CallKit-style discrete call, no equivalent path exists today. As both an iOS developer and a motorcyclist, I would very much like to see this resolved — solving it would meaningfully improve safety for every rider using an iPhone with CarPlay. Configurations I have tested (all reproduce the symptom on iOS 18+ / 26 with wireless CarPlay): AVAudioSession.Category.playAndRecord + .voiceChat mode + various option combinations (duckOthers, mixWithOthers, allowBluetoothHFP, allowBluetoothA2DP, defaultToSpeaker) Same category with .videoChat mode (which @livekit/react-native defaults to) Same category with .default mode (re-applied after setAudioModeAsync to defeat any framework override) — confirmed Mode = Default for ~2 s window in audiomxd log before WebRTC's setActive cycle returned mode to .voiceChat. Buttons remained remapped during the .default window. Disabling MPRemoteCommandCenter and clearing MPNowPlayingInfoCenter.default().nowPlayingInfo JS-side override of WebRTC's global RTCAudioSessionConfiguration via @livekit/react-native's AudioSession.setAppleAudioConfiguration({audioMode: 'default'}) bridge, applied both before connect and after setAudioModeAsync to defeat library overrides In every case the audiomxd system log confirms our session goes active (Mode = VoiceChat or Default, Recording = YES), and CarPlay HID buttons are immediately remapped to call-control. The middle "OK" button remains functional because it is not part of the call-control mapping — confirming the buttons are not blocked, only re-purposed. The remap occurs the instant the iOS recording indicator appears, regardless of audio session mode. This led me to conclude the trigger is not audio session mode but the combination of microphone permission + active session + (likely) the AUVoiceIO unit instantiated by WebRTC. I cannot find a public API path to suppress this classification while maintaining the always-on continuous voice channel. My questions: Is there an entitlement or API that allows an app with active microphone capture to declare itself as a non-call media participant, keeping CarPlay HID transport buttons in the media role? Is AVAudioSession.setPrefersEchoCancelledInput(_:) (iOS 18+) the intended path for retaining platform AEC under .default mode without the focus-engine "communication priority" marking? Documentation is sparse on its CarPlay arbitration implications. Does the PushToTalk framework affect HID arbitration differently from playAndRecord + voiceChat? Our continuous-channel UX does not fit the PTT transmit-on-press model, but understanding the contrast would help. If no current API exists, is this something the iOS Audio team would consider for future SDKs? Solving this would meaningfully improve safety for motorcycle and adventure-sport users on iOS. Thank you for your time and any guidance you can offer. — Emre Erkaya / Uniq Intercom
1
0
313
3w
Carplay App category for Fuelling and EV Charging
From the Developer Guide page 12 for the entitlements. The footnote mentions that CarPlay EV charging app and CarPlay fueling app entitlements may be combined in a single app Does this mean that i can implement both fuelling and EV charging feature in the same app ? How will the entitlement process to get this be done ? should i make 2 request for each of the entitlement ?
1
0
139
3w
CarPlay voice-based-conversational app crashes when CarPlay scene activates before phone scene (React Native + Expo)
Hi all, I'm building a CarPlay app for the voice-based-conversational category (entitlement approved March 2026), and I've hit a crash I can't resolve through public documentation. Hoping someone here has seen this. Setup App: React Native via Expo SDK 54 (RN 0.81) CarPlay library: react-native-carplay@2.4.1-beta.0 iOS: 26.4.2 Entitlement: com.apple.developer.carplay-voice-based-conversation Architecture: ExpoAppDelegate subclass with two scene delegates declared in UIApplicationSceneManifest: PhoneSceneDelegate (UIWindowSceneDelegate) CarSceneDelegate (CPTemplateApplicationSceneDelegate) What works iPhone app launched first, CarPlay connects after: no crash. Placeholder CPListTemplate titled "Enough" displays. templateApplicationScene(_:didConnect:) is called. However the React Native side never receives the didConnect event from RNCarPlay — the placeholder is the only thing that ever shows. JS never gets a chance to call setRootTemplate(VoiceControlTemplate). What fails When CarPlay is the first scene to activate (iPhone app not running, user opens the app icon directly on the head unit), the app crashes immediately: Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000190932800 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Triggered by Thread: 0 Thread 0 Crashed: 0 libswiftCore.dylib _assertionFailure(...) AssertCommon.swift:171 1-5 Enough (our Swift code, in CarSceneDelegate path) 6 libdispatch.dylib _dispatch_call_block_and_release Thread 11 (in parallel): hermes evaluatePreparedJavaScript React ReactInstance::loadScript React RCTJSThreadManager runRunLoop So React Native is bootstrapping on Thread 11 (Hermes loading the bundle), but Thread 0 fires a Swift assertion in our code path immediately after factory.startReactNative(...). What we've tried ~16 builds with iterative hypotheses. Two key ones: Passing UIWindow(frame: UIScreen.main.bounds) to factory.startReactNative(in:): crashes because iOS 13+ requires every UIWindow to belong to a UIWindowScene, and we were creating one without scene association. Passing nil to factory.startReactNative(in:): the header RCTReactNativeFactory.h declares inWindow:(UIWindow *_Nullable)window, so nil should be valid. But the crash signature is identical — Swift assertion failure inside ExpoReactNativeFactory or RCTReactNativeFactory. Looks like an internal precondition that requires window != nil despite the header. Other hypotheses ruled out: linker stripping of scene delegate classes (verified with nm), wrong protocol method signature (we use didConnect: for voice-based-conversational, not didConnect:to: which is for navigation apps), AppDelegate vs SceneDelegate bootstrap conflict. One hypothesis we haven't tested: bootstrapping React Native fully in application:didFinishLaunchingWithOptions: before any scene activates, exposing the bridge via singleton. This is the pattern documented in RN issue #41777 and the Adapptor blog (2022). We haven't tried because ExpoReactNativeFactory is more opaque than the older RCTAppDelegate and we're unsure which internal initialization steps are safe to extract. Specific questions Is RCTReactNativeFactory.startReactNative(withModuleName:in:launchOptions:) actually supported with nil window? The _Nullable annotation suggests yes, but runtime says no. Is the annotation aspirational or am I missing a setup step? For React Native apps using voice-based-conversational, is there a recommended pattern to handle CarPlay-first launch? All public documentation I've found is either for legacy CPApplicationDelegate or for navigation apps with MapTemplate. Can VoiceControlTemplate be presented from native Swift without involving the JS bridge for the initial template? This would let us avoid the bridge bootstrap problem on the CarPlay scene path. Any insights, war stories, or pointers to documentation I might have missed would be hugely appreciated. Multi-week investigation here and I'd love to find the right pattern or confirm an upstream issue worth filing as feedback. Thanks!
1
0
269
3w
CarPlay: AVSpeechUtterance not speaking/playing audio in some cars
I am having an issue with the code that I posted below. I capture voice in my CarPlay app, then allow the user to have it read back to them using AVSpeechUtterance. This works fine on some cars, but many of my beta testers report no audio being played. I have also experienced this in a rental car where the audio was either too quiet or the audio didn't play. Does anyone see any issue with the code that I posted? This is for CarPlay specifically. class CarPlayTextToSpeechService: NSObject, ObservableObject, AVSpeechSynthesizerDelegate { private var speechSynthesizer = AVSpeechSynthesizer() static let shared = CarPlayTextToSpeechService() /// Completion callback private var completionCallback: (() -> Void)? override init() { super.init() speechSynthesizer.delegate = self } func configureAudioSession() { do { try AVAudioSession.sharedInstance().setCategory(.playback, mode: .voicePrompt, options: [.duckOthers, .interruptSpokenAudioAndMixWithOthers, .allowBluetoothHFP]) } catch { print("Failed to set audio session category: \(error.localizedDescription)") } } public func speak(_ text: String, completion: (() -> Void)? = nil) { self.configureAudioSession() // Store the completion callback self.completionCallback = completion Task(priority: .high) { let speechUtterance = AVSpeechUtterance(string: text) let langCode = Locale.preferredLocalLanguageCountryCode if langCode == "en-US" { speechUtterance.voice = AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex) } else { speechUtterance.voice = AVSpeechSynthesisVoice(language: langCode) } try AVAudioSession.sharedInstance().setActive(true, options: .notifyOthersOnDeactivation) speechSynthesizer.speak(speechUtterance) } } func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) { Task { stopSpeech() try AVAudioSession.sharedInstance().setActive(false) } // Call completion callback if available self.completionCallback?() self.completionCallback = nil } func stopSpeech() { speechSynthesizer.stopSpeaking(at: .immediate) } }
3
0
516
4w
Have CPNowPlayingPlaybackRateButton show current playback speed even when paused?
I am working on a CarPlay app that plays back audio content. When attempting to use the CPNowPlayingPlaybackRateButton button, it works well for changing the speed, except for when the audio is paused. Then it shows the speed as 0x, which is technically true but not great for the UI. In looking at how other audio apps handle this, in the case where the app is using the CPNowPlayingPlaybackRateButton and not an image button, they mostly hide the button when paused. The only apps that don't (that I've found) are Apple's Podcasts and Audiobooks apps, which manage to keep the rate button showing the value it had when playing. So, it's possible? I tried setting the defaultRate property of the AVPlayer, along with the rate property, but that didn't seem to help. I'd like to use the standard button instead of an image button if possible. Any suggestions most welcomed!
4
0
1.2k
Apr ’26
CarPlay Simulator (from Additional tools) stuck on "Connecting to phone" since March 4th
We're experiencing an issue where the CarPlay Simulator (from Apple Developer Additional Tools) stopped connecting to our iPhones as of March 4th, 2025. The simulator gets stuck indefinitely on "Connecting to phone" and never completes the pairing. Environment App: Oracle Field Service iOS app (with CarPlay support) Tool: CarPlay Simulator from Apple Developer Additional Tools (developer.apple.com/download/all/) Issue start date: Wednesday, March 4th, 2025 Tested on: Multiple Mac machines, multiple iPhones Multiple CarPlay Simulator versions tested What's happening The CarPlay Simulator launches but displays "Connecting to phone" indefinitely. It was working correctly prior to March 4th with no changes on our end. What still works CarPlay functions correctly when the same iPhone is connected to a real car, confirming the issue is specific to the simulator. Troubleshooting steps already attempted Reset permissions and re-added the simulator Forgot the simulator and re-paired it Changed the USB cable Tested on multiple Mac machines Tested on multiple iPhones Tried multiple versions of the CarPlay Simulator Confirmed no VPN is in use Confirmed with IT, no OS updates or enterprise restrictions were applied Questions Has anyone else experienced this since March 4th? Was there a change in CarPlay Simulator behavior or a requirement on the Apple side (certificate, entitlement, protocol) around that date? Is there a known workaround or fix?
3
6
502
Apr ’26
CarPlay CPListImageRowItem causes Inverted Scrolling and Side Button malfunction
In my CarPlaySceneDelegate.swift, I have two tabs: The first tab uses a CPListImageRowItem with a CPListImageRowItemRowElement. The scroll direction is inverted, and the side button does not function correctly. The second tab uses multiple CPListItem objects. There are no issues: scrolling works in the correct direction, and the side button behaves as expected. Steps To Reproduce Launch the app. Connect to CarPlay. In the first tab, scroll up and down, then use the side button to navigate. In the second tab, scroll up and down, then use the side button to navigate. As observed, the scrolling behavior is different between the two tabs. Code Example: import CarPlay import UIKit class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { var interfaceController: CPInterfaceController? func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController ) { self.interfaceController = interfaceController downloadImageAndSetupTemplates() } func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController ) { self.interfaceController = nil } private func downloadImageAndSetupTemplates() { let urlString = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcYUjd1FYkF04-8Vb7PKI1mGoF2quLPHKjvnR7V4ReZR8UjW-0NJ_kC7q13eISZGoTCLHaDPVbOthhH9QNq-YA0uuSUjfAoB3PPs1aXQ&s=10" guard let url = URL(string: urlString) else { setupTemplates(with: UIImage(systemName: "photo")!) return } URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in let image: UIImage if let data = data, let downloaded = UIImage(data: data) { image = downloaded } else { image = UIImage(systemName: "photo")! } DispatchQueue.main.async { self?.setupTemplates(with: image) } }.resume() } private func setupTemplates(with image: UIImage) { // Tab 1 : un seul CPListImageRowItem avec 12 CPListImageRowItemRowElement let elements: [CPListImageRowItemRowElement] = (1...12).map { index in CPListImageRowItemRowElement(image: image, title: "test \(index)", subtitle: nil) } let rowItem = CPListImageRowItem(text: "Images", elements: elements, allowsMultipleLines: true) rowItem.listImageRowHandler = { item, elementIndex, completion in print("tapped element \(elementIndex)") completion() } let tab1Section = CPListSection(items: [rowItem]) let tab1Template = CPListTemplate(title: "CPListImageRowItemRowElement", sections: [tab1Section]) // Tab 2 : 12 CPListItem simples let tab2Items: [CPListItem] = (1...12).map { index in let item = CPListItem(text: "Item \(index)", detailText: "Detail \(index)") item.handler = { _, completion in print("handler Tab 2") completion() } return item } let tab2Section = CPListSection(items: tab2Items) let tab2Template = CPListTemplate(title: "CPListItem", sections: [tab2Section]) // CPTabBarTemplate avec les deux tabs let tabBar = CPTabBarTemplate(templates: [tab1Template, tab2Template]) interfaceController?.setRootTemplate(tabBar, animated: true) } } Here is a quick video:
7
0
638
Apr ’26
CarPlay navigation guidance panel with red color in iOS 26.4
When upgrading to iOS 26.4, the guidance panel in CPMapTemplate is displayed in a striking red color. This happens with App Store version of the app which was compiled with iOS 26.2. Up to iOS 26.4 this panel has always been shown with a color which matches the ETA view below, in a dark gray. Compiling the app with iOS 26.4 makes nos difference. I have checked my code and I cannot see anything on my side which can trigger this change in the colour and only for iOS 26.4. I thought of restoring the old behaviour by using the property guidanceBackgroundColor in CPMapTemplate. But although I have tried to use a gray, I still get the red color. Is this the intended color in iOS 26.4? Is it a bug? Is there a way to use a custom color which matches the left and ETA panels? Thank you.
1
0
258
Apr ’26
How to use CPTabBarTemplate on navigation apps?
According to the CarPlay developer guide navigation apps are allowed to use the CPTabBarTemplate. Thing is that navigation apps most likely use a CPMapTemplate as root template already, so how should the CPTabBarTemplate be used then? Setting a new root with a CPTabBarTemplate will probably break ongoing navigation and CPTabBarTemplate can't be pushed.
0
0
257
Apr ’26
CarPlay CPGridTemplate corrupt items
For some reason, Carplay 18.x works fine, however in under certain situations in our app, Carplay 26.x breaks. The expected grid layout should be : However, this is what we see in some cases when we update our templates. I have not been able to isolate the cause of this issue. Has anyone ever seen this happen on their CarPlay apps and discovered the cause? The data sets fed into the templates are identical, the difference is in some of the timing and update order...
1
0
269
Apr ’26
Entitlement "com.apple.developer.carplay-driving-task" not allowing audio playback for voice controlled interaction
According to https://developer.apple.com/download/files/CarPlay-Developer-Guide.pdf , apps with entitlement com.apple.developer.carplay-driving-task are allowed to use voice control. In my current implementation the voice recording working fine but the voice response (AVPlayer with category "playback set") does not output any audio. I suspect that it is a entitlement limitation because if I quickly tap to play a music while the voice assistant AVPlayer is "playing", then I can hear the response, but without this trick it stays playing but mute. In parallel I have now requested com.apple.developer.carplay-voice-based-conversation entitlement , but I don't even know if when approved I will be able to use 2 entitlement for the same CarPlay app. Long story short: 1 - Should an app be able to play audio responses when it's CarPlay entitlement is com.apple.developer.carplay-driving-task? 2 - If not, can I combine entitlements com.apple.developer.carplay-driving-task and com.apple.developer.carplay-voice-based-conversation?
Replies
2
Boosts
0
Views
752
Activity
1d
Inconsistent CarPlay Audio Routing: Residual WebKit AudioContext Causes Stuttering in Third-Party Audio Apps via Wireless CarPlay
Environment: OS: iOS 16.0 and later (up to iOS 17.x / 18 beta) Subtopic: CarPlay (Wireless / Wi-Fi & Bluetooth Link) Frameworks: WebKit (WKWebView), AVFAudio (AVAudioSession), CoreAudio Description : We have encountered a critical audio routing and scheduling anomaly specific to Wireless CarPlay environments when a WKWebView leaves a residual AudioContext instance. In our iOS application, we embed an H5 page that utilizes the Web Audio API (AudioContext) to handle audio playback, which includes standard user-interaction-based mute unlocking logic. Under normal conditions (including standalone device playback, Bluetooth A2DP, and Wired CarPlay), if the H5 page is dismissed without explicitly invoking AudioContext.close(), the system handles resource recycling gracefully without side effects. However, exclusively under a Wireless CarPlay connection, if the H5 page is destroyed but the WebKit AudioContext instance remains active or is not explicitly closed by the frontend script, a severe system-level audio scheduling conflict occurs. This anomaly breaks the audio pipeline behavior, causing persistent stuttering, dropped frames, and intermittent audio dropping in concurrent third-party music applications (such as KuGou Music, Spotify, etc.). Observed Behavior & Technical Analysis: Wireless CarPlay Specificity: The issue cannot be reproduced on Wired CarPlay or standard Bluetooth audio routing. This suggests that the CarPlay audio server daemon over Wi-Fi (AirPlay-based transport mechanism) has a different constraint or synchronization mechanism regarding audio graph changes. AudioSession / Audio Graph Contention: It appears that when AudioContext is alive, WebKit maintains an active AVAudioSession or an unreleased node in the system audio graph. When the app switches context or destroys the webview wrapper, the system fails to force-evict or deactivate this residual context under Wireless CarPlay scheduling rules. Resource Starvation for Background Apps: The persistent, phantom audio node induces scheduling friction or thread starvation in the CarPlay audio routing daemon, manifesting as severe buffering/stuttering in whatever third-party audio app currently holds the primary AVAudioSession mixable/non-mixable slot. Questions for Apple Engineers : Root Cause of Wireless CarPlay Routing Discrepancy: Why does the CarPlay audio routing daemon handle unreleased WebKit AudioContext nodes differently over Wireless CarPlay compared to Wired CarPlay and native device endpoints? Is there an underlying lock or stream synchronization issue within the wireless CoreAudio server pipeline? Native iOS Client Side Mitigation/Fallback: Is there an recommended pattern for the native iOS app wrapper (WKWebView container) to forcefully invalidate or tear down WebKit-initiated AudioContext sessions upon view dismissal, ensuring a foolproof fallback even if the H5 frontend fails to call .close() properly? Best Practices for Web Audio + CarPlay Integration: Are there any specific AVAudioSession.CategoryOptions or WebKit configurations we should enforce to prevent a background H5 page from interfering with the system-wide CarPlay audio scheduling? Any insights, workarounds, or documentation pointers from the CoreAudio or CarPlay teams would be greatly appreciated. Thanks!
Replies
0
Boosts
0
Views
56
Activity
1d
CarPlay: CPListItem.image degrades to placeholder glyph mid-session, only iPhone reboot recovers — FB22828125
Posting here in case other CarPlay developers are hitting the same thing, and to give Apple engineers a forum-side reference for the radar. Filed as FB22828125. Symptom In a CarPlay app using CPListTemplate, UIImage instances assigned to CPListItem.image start rendering as the system placeholder glyph after extended CarPlay use (several hours to a few days of cumulative session time). Text labels and accessory chevrons still render correctly — only the leading image is affected, and it affects every visible template surface at once. Known recovery Once the failure starts, it survives: Killing and relaunching the app Force-quitting and relaunching from CarPlay itself Disconnecting and reconnecting CarPlay The only known recovery is rebooting the iPhone. After reboot, the same code path renders correctly again — until the failure reoccurs. App-side ruling-out UIImage instances passed to CPListItem.image are non-nil at failure time (verified by assertions) Each template rebuild calls UIGraphicsImageRenderer afresh from UIImage(systemName:) — no caching of UIImage across rebuilds Images are baked via withTintColor(_:renderingMode: .alwaysOriginal) then rasterized, so CarPlay receives a finished bitmap rather than a template image relying on its tinting pipeline Same code path renders correctly on launch and for hours afterward — the input bytes are identical before and after the failure boundary Because the failure survives both the app process and the CPTemplateApplicationScene teardown, the corrupted state appears to live in an iOS system process rather than in the app or the CarPlay session. Question for the forum Is there a known workaround on the app side — a different image-supply API, or a way to force the CarPlay rendering pipeline to invalidate its cache without an iPhone reboot?
Replies
3
Boosts
0
Views
207
Activity
5d
CPPointOfinterestTemplate : How to get the event for "X"/Close button
Hi, I am using the CPPointOfinterestTemplate and wanted to change the trailingNavigationBarButtons when the user navigate to detail screen(This is done with the help of didSelectPointOfInterest delegate function). However i could not find any documentation on resetting the trailingNavigationBarButtons when the user click on the "X"/Close button on the details screen. Can you explain if there is any way i can handle my
Replies
0
Boosts
0
Views
100
Activity
1w
CarPlay Function lost (26.4 and 26.5 DB)
with the latest updates on two of our iPhones run running 26.4 and the other 26.5 developed beta we have lost the ability to use CarPlay functionality via the Apple certified cable. Both phone showed the phone is connected and it is charging however functionality are greyed out on display in the 2022 Nissan rogue. Bluetooth still function properly as you could send and receive calls. However, functionality via the cable does not work. You cannot play music either. this feature also greyed. A trip to the Nissan dealer for more troubleshooting provided the following. A version 15 iPhone Connect via usb-c cable and functioned properly. As well as an android device. But again, hook up two iPhones one with version 26.5 DB and the other 26.4 both iPhone 14 would not work. After we left the dealership, I had a hunch that the issue with the latest update that both of these phones received over last week. I came home and connected an iPhone 6S which has a much older software version and it connected to CarPlay displayed maps and played music. Hopefully we can get another update soon that will resolve the issue via the lightning cable connection.
Replies
2
Boosts
1
Views
754
Activity
1w
audiomxd PVM misclassifies CarPlay head unit as BTHeadphones — CarPlay never activates despite successful iAP2 auth
iPhone 16 Pro, iOS 26.5 (23F77), Nissan Sentra 2022, USB-C wired CarPlay. CarPlay fails every attempt despite the iAP2 handshake completing successfully. Same cable + same car works with a different iPhone. After digging through sysdiagnose logs I found the root cause in audiomxd. The head unit's Bluetooth MAC (BC:42:8C:B8:06:AF) is permanently stored in the PVM as HeadphonesBT: PVM: Route [58] = HeadphonesBT~BC:42:8C:B8:06:AF This causes FigRoutingManagerProcessCustomizedRouting to return: isPortOfTypeCarPlayAtIndex = NO modelID = BTHeadphones4236,19521 And vaemProcessCarPlayCustomizedRouting never adds a starkPort: portsToAdd[0] = AirPlayHandoffDevice portsToAdd does NOT contain a starkPort Without a starkPort the audio routing never activates. The endpoint gets published under endpointManager=Bluetooth as BluetoothHFPInput/Output instead of CarPlay. Disconnect follows with errors -16723 and -16617. This survives Forget Device, Forget Car, Reset Network Settings, and reboots. The only thing that clears it is Reset All Settings. Two questions: Is there a supported way to purge audiomxd's PVM for a specific MAC address without Reset All Settings? 2. Is BTHeadphones4236,19521 a known misclassification for Nissan head units in iOS 26? Sysdiagnose attached to Feedback Assistant report FB22815215.
Replies
0
Boosts
0
Views
283
Activity
1w
CarPlay Simulator not Working
I am trying to run my navigation app on a physical device, and want to view it using CarPlay Simulator (through XCode additional tools, NOT Hardware->Display->CarPlay), however, when I try to use the app, device has a Red dot next to it, and the simulator shows nothing. What I've tried: Running on a real CP device(my car): App works as intended, but want to run simulator so I can have live debugging Forgetting CP device and reconnecting All Steps of "Troubleshooting CP Simulator" (Updating to latest iOS, restarting phone, turn off hotspot, not connected to any other CP devices, ensure Firewall allows incoming connections) Tried both Xcode 13 CP sim and Xcode 14 beta CP sim Tried both work and personal laptops/phones Ideas: I am running on a M1 laptop, which could be messing with something. I am also running my Xcode in Rosetta(app has packages that cannot compile without Rosetta), but I don't believe this should be a problem because I am running on a physical device not Xcode simulator. Also can't run on Hardware->Display->CarPlay because of Application does not implement CarPlay template application lifecycle methods in its scene delegate and I can't figure out how to fix ("EXCLUDED_ARCHS[sdk=iphonesimulator*]"= "arm64" does not work)
Replies
8
Boosts
6
Views
6.5k
Activity
2w
Detect if a widget is displayed in CarPlay vs. iPhone/iPad
I am looking into the new CarPlay support for systemSmall widgets introduced in iOS 26 (Apple documentation). I am trying to figure out if there is a way to programmatically detect whether the widget is currently being displayed on the iPhone/iPad home/lock screen or in CarPlay. So far, I haven’t found any information in the documentation or APIs that indicate how to distinguish between these environments. Is there an API, environment value, or best practice for handling this scenario? Thanks in advance for any insights!
Replies
2
Boosts
1
Views
510
Activity
2w
CarPlay Display Issue: Missing Images After Extended Navigation
I am experiencing a persistent issue with my CarPlay application where images rendered within the CarPlay Template interface disappear after the application has been used for an extended period, typically during prolonged navigation. Images used directly within the CarPlay Template framework disappear. In the attached image showing the issue (IMG_1022.PNG), you can see that the icons for 'parking', 'gasstation', 'conveniencestore', and 'favoritespot' are missing. The side bar icons (car, battery, etc.) remain visible, and the text labels are present, but the Template-specific images/icons vanish. Problem Description Images displayed on a custom UIViewController remain visible. Some of our screens integrate a UIViewController (e.g., for map display), and any images rendered on that view controller (not the template itself) continue to display correctly without issue. Example Images IMG_1021.PNG (Normal/Correct Display): This image shows the SearchMenu screen with all icons displayed correctly next to their respective labels ('word', 'home', 'route', 'history', 'parking', 'gasstation', 'conveniencestore', 'favoritespot'). IMG_1022.PNG (Problem State): This image shows the same screen after prolonged use, where the icons next to 'parking', 'gasstation', 'conveniencestore', and 'favoritespot' have disappeared, leaving only the text labels. Question Has anyone encountered a similar issue? This seems to be a rendering or resource management problem specific to images within the CarPlay Template components when the application runs for an extended duration.
Replies
2
Boosts
0
Views
293
Activity
2w
CarPlay HID transport buttons remap to call-control during continuous mic capture (no opt-out API)
Hello, I am developing Uniq Intercom, a voice-only group communication app for motorcyclists (always-on intercom over WebRTC, used continuously for multi-hour rides). I am seeking guidance on an iOS audio session and CarPlay HID interaction I have not been able to resolve through documented APIs. Problem: As soon as my app activates the microphone (yellow recording indicator visible), iOS appears to classify the app as a real-time communication participant and CarPlay re-routes the steering-wheel / handlebar HID transport buttons (left / right / ok) from the media-control role to the call-control role (answer/decline). Because I do not register a CallKit / LiveCommunicationKit call (the session is a continuous group voice channel, not a discrete telephony call), there is no call object for those buttons to act upon — they effectively become inert. Why this matters: Motorcyclists rely on the intercom for 4–6 hour rides. CarPlay is now built into a growing number of modern motorcycles and with aftermarket display units virtually any bike, and any rider who uses any voice communication platform alongside it — Uniq Intercom, WhatsApp Call currently runs into this same handlebar button remap. With the buttons inert, the rider's only remaining option is to reach for the motorcycle's touchscreen to skip a track or change navigation — this is unsafe. The exact same remap behavior occurs during a real WhatsApp or Phone call — but for those the remap is correct (answer/decline maps to a real call). For continuous voice apps without a CallKit-style discrete call, no equivalent path exists today. As both an iOS developer and a motorcyclist, I would very much like to see this resolved — solving it would meaningfully improve safety for every rider using an iPhone with CarPlay. Configurations I have tested (all reproduce the symptom on iOS 18+ / 26 with wireless CarPlay): AVAudioSession.Category.playAndRecord + .voiceChat mode + various option combinations (duckOthers, mixWithOthers, allowBluetoothHFP, allowBluetoothA2DP, defaultToSpeaker) Same category with .videoChat mode (which @livekit/react-native defaults to) Same category with .default mode (re-applied after setAudioModeAsync to defeat any framework override) — confirmed Mode = Default for ~2 s window in audiomxd log before WebRTC's setActive cycle returned mode to .voiceChat. Buttons remained remapped during the .default window. Disabling MPRemoteCommandCenter and clearing MPNowPlayingInfoCenter.default().nowPlayingInfo JS-side override of WebRTC's global RTCAudioSessionConfiguration via @livekit/react-native's AudioSession.setAppleAudioConfiguration({audioMode: 'default'}) bridge, applied both before connect and after setAudioModeAsync to defeat library overrides In every case the audiomxd system log confirms our session goes active (Mode = VoiceChat or Default, Recording = YES), and CarPlay HID buttons are immediately remapped to call-control. The middle "OK" button remains functional because it is not part of the call-control mapping — confirming the buttons are not blocked, only re-purposed. The remap occurs the instant the iOS recording indicator appears, regardless of audio session mode. This led me to conclude the trigger is not audio session mode but the combination of microphone permission + active session + (likely) the AUVoiceIO unit instantiated by WebRTC. I cannot find a public API path to suppress this classification while maintaining the always-on continuous voice channel. My questions: Is there an entitlement or API that allows an app with active microphone capture to declare itself as a non-call media participant, keeping CarPlay HID transport buttons in the media role? Is AVAudioSession.setPrefersEchoCancelledInput(_:) (iOS 18+) the intended path for retaining platform AEC under .default mode without the focus-engine "communication priority" marking? Documentation is sparse on its CarPlay arbitration implications. Does the PushToTalk framework affect HID arbitration differently from playAndRecord + voiceChat? Our continuous-channel UX does not fit the PTT transmit-on-press model, but understanding the contrast would help. If no current API exists, is this something the iOS Audio team would consider for future SDKs? Solving this would meaningfully improve safety for motorcycle and adventure-sport users on iOS. Thank you for your time and any guidance you can offer. — Emre Erkaya / Uniq Intercom
Replies
1
Boosts
0
Views
313
Activity
3w
Carplay App category for Fuelling and EV Charging
From the Developer Guide page 12 for the entitlements. The footnote mentions that CarPlay EV charging app and CarPlay fueling app entitlements may be combined in a single app Does this mean that i can implement both fuelling and EV charging feature in the same app ? How will the entitlement process to get this be done ? should i make 2 request for each of the entitlement ?
Replies
1
Boosts
0
Views
139
Activity
3w
CarPlay voice-based-conversational app crashes when CarPlay scene activates before phone scene (React Native + Expo)
Hi all, I'm building a CarPlay app for the voice-based-conversational category (entitlement approved March 2026), and I've hit a crash I can't resolve through public documentation. Hoping someone here has seen this. Setup App: React Native via Expo SDK 54 (RN 0.81) CarPlay library: react-native-carplay@2.4.1-beta.0 iOS: 26.4.2 Entitlement: com.apple.developer.carplay-voice-based-conversation Architecture: ExpoAppDelegate subclass with two scene delegates declared in UIApplicationSceneManifest: PhoneSceneDelegate (UIWindowSceneDelegate) CarSceneDelegate (CPTemplateApplicationSceneDelegate) What works iPhone app launched first, CarPlay connects after: no crash. Placeholder CPListTemplate titled "Enough" displays. templateApplicationScene(_:didConnect:) is called. However the React Native side never receives the didConnect event from RNCarPlay — the placeholder is the only thing that ever shows. JS never gets a chance to call setRootTemplate(VoiceControlTemplate). What fails When CarPlay is the first scene to activate (iPhone app not running, user opens the app icon directly on the head unit), the app crashes immediately: Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000190932800 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Triggered by Thread: 0 Thread 0 Crashed: 0 libswiftCore.dylib _assertionFailure(...) AssertCommon.swift:171 1-5 Enough (our Swift code, in CarSceneDelegate path) 6 libdispatch.dylib _dispatch_call_block_and_release Thread 11 (in parallel): hermes evaluatePreparedJavaScript React ReactInstance::loadScript React RCTJSThreadManager runRunLoop So React Native is bootstrapping on Thread 11 (Hermes loading the bundle), but Thread 0 fires a Swift assertion in our code path immediately after factory.startReactNative(...). What we've tried ~16 builds with iterative hypotheses. Two key ones: Passing UIWindow(frame: UIScreen.main.bounds) to factory.startReactNative(in:): crashes because iOS 13+ requires every UIWindow to belong to a UIWindowScene, and we were creating one without scene association. Passing nil to factory.startReactNative(in:): the header RCTReactNativeFactory.h declares inWindow:(UIWindow *_Nullable)window, so nil should be valid. But the crash signature is identical — Swift assertion failure inside ExpoReactNativeFactory or RCTReactNativeFactory. Looks like an internal precondition that requires window != nil despite the header. Other hypotheses ruled out: linker stripping of scene delegate classes (verified with nm), wrong protocol method signature (we use didConnect: for voice-based-conversational, not didConnect:to: which is for navigation apps), AppDelegate vs SceneDelegate bootstrap conflict. One hypothesis we haven't tested: bootstrapping React Native fully in application:didFinishLaunchingWithOptions: before any scene activates, exposing the bridge via singleton. This is the pattern documented in RN issue #41777 and the Adapptor blog (2022). We haven't tried because ExpoReactNativeFactory is more opaque than the older RCTAppDelegate and we're unsure which internal initialization steps are safe to extract. Specific questions Is RCTReactNativeFactory.startReactNative(withModuleName:in:launchOptions:) actually supported with nil window? The _Nullable annotation suggests yes, but runtime says no. Is the annotation aspirational or am I missing a setup step? For React Native apps using voice-based-conversational, is there a recommended pattern to handle CarPlay-first launch? All public documentation I've found is either for legacy CPApplicationDelegate or for navigation apps with MapTemplate. Can VoiceControlTemplate be presented from native Swift without involving the JS bridge for the initial template? This would let us avoid the bridge bootstrap problem on the CarPlay scene path. Any insights, war stories, or pointers to documentation I might have missed would be hugely appreciated. Multi-week investigation here and I'd love to find the right pattern or confirm an upstream issue worth filing as feedback. Thanks!
Replies
1
Boosts
0
Views
269
Activity
3w
CarPlay: AVSpeechUtterance not speaking/playing audio in some cars
I am having an issue with the code that I posted below. I capture voice in my CarPlay app, then allow the user to have it read back to them using AVSpeechUtterance. This works fine on some cars, but many of my beta testers report no audio being played. I have also experienced this in a rental car where the audio was either too quiet or the audio didn't play. Does anyone see any issue with the code that I posted? This is for CarPlay specifically. class CarPlayTextToSpeechService: NSObject, ObservableObject, AVSpeechSynthesizerDelegate { private var speechSynthesizer = AVSpeechSynthesizer() static let shared = CarPlayTextToSpeechService() /// Completion callback private var completionCallback: (() -> Void)? override init() { super.init() speechSynthesizer.delegate = self } func configureAudioSession() { do { try AVAudioSession.sharedInstance().setCategory(.playback, mode: .voicePrompt, options: [.duckOthers, .interruptSpokenAudioAndMixWithOthers, .allowBluetoothHFP]) } catch { print("Failed to set audio session category: \(error.localizedDescription)") } } public func speak(_ text: String, completion: (() -> Void)? = nil) { self.configureAudioSession() // Store the completion callback self.completionCallback = completion Task(priority: .high) { let speechUtterance = AVSpeechUtterance(string: text) let langCode = Locale.preferredLocalLanguageCountryCode if langCode == "en-US" { speechUtterance.voice = AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex) } else { speechUtterance.voice = AVSpeechSynthesisVoice(language: langCode) } try AVAudioSession.sharedInstance().setActive(true, options: .notifyOthersOnDeactivation) speechSynthesizer.speak(speechUtterance) } } func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) { Task { stopSpeech() try AVAudioSession.sharedInstance().setActive(false) } // Call completion callback if available self.completionCallback?() self.completionCallback = nil } func stopSpeech() { speechSynthesizer.stopSpeaking(at: .immediate) } }
Replies
3
Boosts
0
Views
516
Activity
4w
Is there an event if the user pops a template with the backbutton
I want to clear certain state when closing a template when the user clicks the backbutton
Replies
0
Boosts
0
Views
83
Activity
Apr ’26
Have CPNowPlayingPlaybackRateButton show current playback speed even when paused?
I am working on a CarPlay app that plays back audio content. When attempting to use the CPNowPlayingPlaybackRateButton button, it works well for changing the speed, except for when the audio is paused. Then it shows the speed as 0x, which is technically true but not great for the UI. In looking at how other audio apps handle this, in the case where the app is using the CPNowPlayingPlaybackRateButton and not an image button, they mostly hide the button when paused. The only apps that don't (that I've found) are Apple's Podcasts and Audiobooks apps, which manage to keep the rate button showing the value it had when playing. So, it's possible? I tried setting the defaultRate property of the AVPlayer, along with the rate property, but that didn't seem to help. I'd like to use the standard button instead of an image button if possible. Any suggestions most welcomed!
Replies
4
Boosts
0
Views
1.2k
Activity
Apr ’26
CarPlay Simulator (from Additional tools) stuck on "Connecting to phone" since March 4th
We're experiencing an issue where the CarPlay Simulator (from Apple Developer Additional Tools) stopped connecting to our iPhones as of March 4th, 2025. The simulator gets stuck indefinitely on "Connecting to phone" and never completes the pairing. Environment App: Oracle Field Service iOS app (with CarPlay support) Tool: CarPlay Simulator from Apple Developer Additional Tools (developer.apple.com/download/all/) Issue start date: Wednesday, March 4th, 2025 Tested on: Multiple Mac machines, multiple iPhones Multiple CarPlay Simulator versions tested What's happening The CarPlay Simulator launches but displays "Connecting to phone" indefinitely. It was working correctly prior to March 4th with no changes on our end. What still works CarPlay functions correctly when the same iPhone is connected to a real car, confirming the issue is specific to the simulator. Troubleshooting steps already attempted Reset permissions and re-added the simulator Forgot the simulator and re-paired it Changed the USB cable Tested on multiple Mac machines Tested on multiple iPhones Tried multiple versions of the CarPlay Simulator Confirmed no VPN is in use Confirmed with IT, no OS updates or enterprise restrictions were applied Questions Has anyone else experienced this since March 4th? Was there a change in CarPlay Simulator behavior or a requirement on the Apple side (certificate, entitlement, protocol) around that date? Is there a known workaround or fix?
Replies
3
Boosts
6
Views
502
Activity
Apr ’26
CarPlay CPListImageRowItem causes Inverted Scrolling and Side Button malfunction
In my CarPlaySceneDelegate.swift, I have two tabs: The first tab uses a CPListImageRowItem with a CPListImageRowItemRowElement. The scroll direction is inverted, and the side button does not function correctly. The second tab uses multiple CPListItem objects. There are no issues: scrolling works in the correct direction, and the side button behaves as expected. Steps To Reproduce Launch the app. Connect to CarPlay. In the first tab, scroll up and down, then use the side button to navigate. In the second tab, scroll up and down, then use the side button to navigate. As observed, the scrolling behavior is different between the two tabs. Code Example: import CarPlay import UIKit class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { var interfaceController: CPInterfaceController? func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController ) { self.interfaceController = interfaceController downloadImageAndSetupTemplates() } func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController ) { self.interfaceController = nil } private func downloadImageAndSetupTemplates() { let urlString = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcYUjd1FYkF04-8Vb7PKI1mGoF2quLPHKjvnR7V4ReZR8UjW-0NJ_kC7q13eISZGoTCLHaDPVbOthhH9QNq-YA0uuSUjfAoB3PPs1aXQ&s=10" guard let url = URL(string: urlString) else { setupTemplates(with: UIImage(systemName: "photo")!) return } URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in let image: UIImage if let data = data, let downloaded = UIImage(data: data) { image = downloaded } else { image = UIImage(systemName: "photo")! } DispatchQueue.main.async { self?.setupTemplates(with: image) } }.resume() } private func setupTemplates(with image: UIImage) { // Tab 1 : un seul CPListImageRowItem avec 12 CPListImageRowItemRowElement let elements: [CPListImageRowItemRowElement] = (1...12).map { index in CPListImageRowItemRowElement(image: image, title: "test \(index)", subtitle: nil) } let rowItem = CPListImageRowItem(text: "Images", elements: elements, allowsMultipleLines: true) rowItem.listImageRowHandler = { item, elementIndex, completion in print("tapped element \(elementIndex)") completion() } let tab1Section = CPListSection(items: [rowItem]) let tab1Template = CPListTemplate(title: "CPListImageRowItemRowElement", sections: [tab1Section]) // Tab 2 : 12 CPListItem simples let tab2Items: [CPListItem] = (1...12).map { index in let item = CPListItem(text: "Item \(index)", detailText: "Detail \(index)") item.handler = { _, completion in print("handler Tab 2") completion() } return item } let tab2Section = CPListSection(items: tab2Items) let tab2Template = CPListTemplate(title: "CPListItem", sections: [tab2Section]) // CPTabBarTemplate avec les deux tabs let tabBar = CPTabBarTemplate(templates: [tab1Template, tab2Template]) interfaceController?.setRootTemplate(tabBar, animated: true) } } Here is a quick video:
Replies
7
Boosts
0
Views
638
Activity
Apr ’26
CarPlay navigation guidance panel with red color in iOS 26.4
When upgrading to iOS 26.4, the guidance panel in CPMapTemplate is displayed in a striking red color. This happens with App Store version of the app which was compiled with iOS 26.2. Up to iOS 26.4 this panel has always been shown with a color which matches the ETA view below, in a dark gray. Compiling the app with iOS 26.4 makes nos difference. I have checked my code and I cannot see anything on my side which can trigger this change in the colour and only for iOS 26.4. I thought of restoring the old behaviour by using the property guidanceBackgroundColor in CPMapTemplate. But although I have tried to use a gray, I still get the red color. Is this the intended color in iOS 26.4? Is it a bug? Is there a way to use a custom color which matches the left and ETA panels? Thank you.
Replies
1
Boosts
0
Views
258
Activity
Apr ’26
How to use CPTabBarTemplate on navigation apps?
According to the CarPlay developer guide navigation apps are allowed to use the CPTabBarTemplate. Thing is that navigation apps most likely use a CPMapTemplate as root template already, so how should the CPTabBarTemplate be used then? Setting a new root with a CPTabBarTemplate will probably break ongoing navigation and CPTabBarTemplate can't be pushed.
Replies
0
Boosts
0
Views
257
Activity
Apr ’26
CarPlay CPGridTemplate corrupt items
For some reason, Carplay 18.x works fine, however in under certain situations in our app, Carplay 26.x breaks. The expected grid layout should be : However, this is what we see in some cases when we update our templates. I have not been able to isolate the cause of this issue. Has anyone ever seen this happen on their CarPlay apps and discovered the cause? The data sets fed into the templates are identical, the difference is in some of the timing and update order...
Replies
1
Boosts
0
Views
269
Activity
Apr ’26