Add CarPlay support to your navigation app using CarPlay.

CarPlay Documentation

Posts under CarPlay tag

97 Posts
Sort by:
Post not yet marked as solved
1 Replies
84 Views
I am Trying to build a audio app which supports from iOS 13 and above. iOS 13 - com.apple.developer.playable-content, iOS 14 - com.apple.developer.carplay-audio I have added above entitlements to support my app for below and above iOS 14 version. <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>CPTemplateApplicationSceneSessionRoleApplication</key> <array> <dict> <key>UISceneClassName</key> <string>CPTemplateApplicationScene</string> <key>UISceneConfigurationName</key> <string>CarPlay</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).CarSceneDelegate</string> </dict> </array> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneClassName</key> <string>UIWindowScene</string> <key>UISceneConfigurationName</key> <string>Phone</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).PhoneSceneDelegate</string> </dict> </array> </dict> </dict> </dict> </plist> This is how I added UIApplicationSceneManifest but problem here is that when we launch app on below ios14 im getting "Unable to Connect Error" But if i add maps support entitlements i can able to render Grid or list templates. So My question is how to add support for below and above iOS14 versions for audio app in same code base. Thanks In advance.
Posted Last updated
.
Post not yet marked as solved
0 Replies
143 Views
Description I present a template to the CPTemplateApplicationSceneDelegate with CPInterfaceController presentTemplate(, animated:, completion:). After this there are two ways to dismiss the template: In case the presented template has a built-in "Cancel" / "Back" button (like CPVoiceControlTemplate), by pressing the button the template disappears. You can call CPInterfaceController dismissTemplate(animated:, completion:), which could be connected to some underlying logic. Calling this also makes the template disappear correctly. The issue can be seen in the Debug Memory Graph under the CarPlay section. In case: After I dismiss the template by pressing the built-in button the presented template GOES OUT OF MEMORY (disappears from the Debug Memory Graph). After I dismiss the template with the given function the presented template REMAINS IN MEMORY (stays in the Debug Memory Graph). This is an unexpected behaviour in my opinion. If I recreate the template before presenting it, a new instance is added to the memory every time. In case of CPVoiceControlTemplate I had animated images in my voiceControlStates. These images take up significant memory and by always remaining in the memory leads to a memory issue. My expectation is that both the built-in button press and the dismissTemplate(animated:, completion:) function should release the template from the memory. Reproduction: A: Present a CPVoiceControlTemplate with CPInterfaceController.presentTemplate(). Press the built-in "Cancel" button in top leading corner of the template. Check Debug Memory Graph under CarPlay section. ➡️ CPVoiceControlTemplate is NOT PRESENT in memory ✅😎 B: Present a CPVoiceControlTemplate with CPInterfaceController.presentTemplate(). Call CPInterfaceController.dismissTemplate() after a timeout. Check Debug Memory Graph under CarPlay section. ➡️ CPVoiceControlTemplate is PRESENT in memory ❌😞 Source code // // CarPlaySceneDelegate.swift // EVNavigationCarplay // // Created by Ákos Morvai on 2023. 02. 21.. // import CarPlay import UIKit class CarPlaySceneDelegate: NSObject { var interfaceController: CPInterfaceController? private func presentTemplate() { let template = CPVoiceControlTemplate(voiceControlStates: []) interfaceController?.presentTemplate(template, animated: true, completion: nil) DispatchQueue.main.asyncAfter(deadline: .now() + 5) { [weak self] in self?.interfaceController?.dismissTemplate(animated: true, completion: nil) } } } extension CarPlaySceneDelegate: CPTemplateApplicationSceneDelegate { func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController, to window: CPWindow) { self.interfaceController = interfaceController presentTemplate() } func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnect interfaceController: CPInterfaceController, from window: CPWindow) { } } extension CarPlaySceneDelegate: CPTemplateApplicationDashboardSceneDelegate { func templateApplicationDashboardScene(_ templateApplicationDashboardScene: CPTemplateApplicationDashboardScene, didConnect dashboardController: CPDashboardController, to window: UIWindow) { } func templateApplicationDashboardScene(_ templateApplicationDashboardScene: CPTemplateApplicationDashboardScene, didDisconnect dashboardController: CPDashboardController, from window: UIWindow) { } } Debug Memory Graph after programmatic dismiss Affected Xcode version I currently use Xcode 15.2 but it happened in earlier versions as well.
Posted
by akos989.
Last updated
.
Post not yet marked as solved
0 Replies
275 Views
After the update to iOS 17, tapping on message notification shown on CarPlay Dashboard is navigating to the CarPlay app instead of announcing the message notification. Announce Notifications turned ON Announce Messages turned ON Announce New Messages option is selected Other apps message notifications are announced as expected when tapping on the notification implying that the settings are set as required. Enabled com.apple.developer.carplay-communication Class CustomCarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController) func scene(_ scene: UIScene, willContinueUserActivityWithType userActivityType: String) }
Posted
by realrider.
Last updated
.
Post marked as solved
1 Replies
555 Views
Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unsupported object <CPActionSheetTemplate: 0x2819a4480> <identifier: CD077C44-7F3F-46CC-B713-35A0259124EA, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to presentTemplate:animated:completion:. Allowed classes: {( CPAlertTemplate, CPVoiceControlTemplate, CPGridTemplate, CPListTemplate, CPNowPlayingTemplate, CPTabBarTemplate )}' [[NMCarPlayEventManage shareManage].carplayInterfaceController dismissTemplateAnimated:NO]; [[NMCarPlayEventManage shareManage].carplayInterfaceController presentTemplate:sp animated:YES];
Posted
by Highmore.
Last updated
.
Post not yet marked as solved
2 Replies
240 Views
A feature of my CarPlay navigation app requires the iPhone app to be open, or recently backgrounded, to function. It requires access to the AppDelegate. Is there any way to quietly launch the iPhone app in the background from CarPlay. I have tried deep linking, but the action of opening the URL requires the iPhone app to be active in the first place.
Posted Last updated
.
Post not yet marked as solved
0 Replies
94 Views
Hi, I am working on a CarPlay fueling/charging app and tried to add trailingNavigationBarButtons to a CPInformationTemplate after pushing it on the root template. The button(s) are being displayed but the button action is not being executed. Does anyone also have this issue?
Posted Last updated
.
Post not yet marked as solved
3 Replies
1.2k Views
The documentation for CarPlay (https://developer.apple.com/documentation/carplay/requesting_carplay_entitlements) tells you to disable automatic signing in the section titled "Import the CarPlay Provisioning Profile": Click All in the scope bar, and then deselect “Automatically manage signing”. There have also been other posts in the past about the inability to use automatic signing with CarPlay: https://developer.apple.com/forums/thread/63468 However in a recent post of mine (https://developer.apple.com/forums/thread/717429?login=true&page=1#732392022) I was instructed how to set it up so that I could use automatic signing for the new user-assigned-device-name entitlement and it worked so I thought "Can I do the same thing for CarPlay?" and it seems to be working so far. Is automatic signing with CarPlay now possible? We have been able to use automatic signing to archive successfully and run to real devices and verify that CarPlay is working. I'm crossing my fingers that we'll be able to submit and get the build approved and never have to touch manual signing again. Hopefully it works and the documentation is just out of date.
Posted
by Helam.
Last updated
.
Post not yet marked as solved
0 Replies
260 Views
Hi, We are developing an infotainment system that includes a wireless CarPlay. Can someone confirm the expected behavior when a device connected via wireless car play should do in the below scenario. iPhone connected through wireless car play and projection is active in he CarPlay projection a call is going on. Car play gets disconnected when user switches off the WiFi. After these steps , should the call only continue on the phone or should the connected get transitioned to HFP ( Hands free profile) and call continue though the head unit in the car. Do note, WiFi is switched OFF in phone so CarPlay can't restart without user switching it back ON
Posted
by Hari004.
Last updated
.
Post not yet marked as solved
0 Replies
246 Views
Hi! I'm sorry, if this is the wrong place to ask this. Please advice if you know a better place. I recently bought a new Hyundai which comes with CarPlay. When I connect my iPhone with a cable, CarPlay is running fine and the Music is played in stereo on the car's speakers. But when I start Apple Maps I can hear turn by turn voice commands in German. But they are only played in mono on he box next to the driver's seat. They are not played anywhere else, but the music stops for all boxes. I tried to figure out, what the issue can be and how to communicate the issue to Apple. So I think it's related to this thread: https://forums.developer.apple.com/forums/thread/732202 Anything I can do? Is there a hidden setting to change that? For me it feels like a bug, I doubt that this is expected. Thank you!
Posted
by rmtzlr.
Last updated
.
Post not yet marked as solved
0 Replies
144 Views
In the Apple video entitled Optimize CarPlay for vehicle systems, from WWDC23, the section on Audio explains that our apps should support "enhancedSiri" I can find no documentation anywhere to support how a developer might implement enhancedSiri? Thank you Mike
Posted
by MetroView.
Last updated
.
Post not yet marked as solved
3 Replies
583 Views
Since XCode 15, we can't get our app in the app store no more. While uploading, we get the message: "Entitlement com.apple.developer.playable-content is missing". The entitlement is for CarPlay and it worked for years -we did not change anything.Now with XCode 15, we had to remove CarPlay completely, otherwise we wouldn't get the app in the App Store no more.
Posted Last updated
.
Post not yet marked as solved
2 Replies
547 Views
Hi iOS member, I have a problem to use a SwiftUI on Carplay. The swiftUI is not refreshed when @State properties are modified. Only UiKit views refreshs well, on Carplay. Is it exists a way to use swiftUI views on Carplay, for example to show a speed of the user on a Map application ? Thank you for your help. Here an example of SwiftUI view : public struct FakeSpeedView: View { @State var speed: Int = 90 let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() public init() {} public var body: some View { Text("Speed \(speed)") .onReceive(timer) { _ in var newValue = speed + 1 if newValue > 130 { newValue = 90 } print("FakeSpeedView update speed \(newValue)") speed = newValue } } } And here, the ViewController used as rootViewController for CPWindow : class ContentViewController: UIViewController { private var circularProgressBarView: CircularProgressBarView! private var circularViewDuration: TimeInterval = 2 private var speedVC: UIViewController! override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) setUpSpeedView() setUpCircularProgressBarView() } private func setUpSpeedView() { speedVC = UIHostingController(rootView: FakeSpeedView()) view.addSubview(speedVC.view) speedVC.view.translatesAutoresizingMaskIntoConstraints = false speedVC.view.pinEdges(to: view) addChild(speedVC) speedVC.didMove(toParent: self) } private func setUpCircularProgressBarView() { // set view circularProgressBarView = CircularProgressBarView(frame: .zero) // align to the center of the screen circularProgressBarView.center = view.center // call the animation with circularViewDuration circularProgressBarView.progressAnimation(duration: circularViewDuration) // add this view to the view controller view.addSubview(circularProgressBarView) } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
378 Views
[posted January 30, 2024] Earlier this month, Apple Classical appeared as an app in CarPlay. Hallelujah!!! Three days later it disappeared after another update, apparently because all it did when activated via CarPlay was crash. OK, it was an oopsie (I get it. I spent 30 years in IT, and, well, it happens. They’re called “undocumented features”). Thing is: Apple hasn’t breathed a word about this event at all. Nothing. Nada. Zip. Zippo. Zilch. There’s a huge pent-up audience for this app in CarPlay. Is it coming? Please? Oh please oh please oh please?
Posted Last updated
.
Post not yet marked as solved
1 Replies
530 Views
Hi I was trying to design the above UI, But using the below code of CPListImageRowItem func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) { self.interfaceController = interfaceController // Create a list row item with images let item = CPListImageRowItem(text: "Category", images: [UIImage(named: "cover.jpeg")!, UIImage(named: "cover2.jpeg")!, UIImage(named: "discover.jpeg")!, UIImage(named: "thumbnail.jpeg")!]) // Create a list section let section = CPListSection(items: [item]) // Create a list template with the section let listTemplate = CPListTemplate(title: "Your Template Title", sections: [section]) // Set the template on the interface controller interfaceController.setRootTemplate(listTemplate, animated: true) } I was getting only header and below image items but detailed text under images are no way to set. can any one help me out of this
Posted
by TarakJaan.
Last updated
.
Post not yet marked as solved
0 Replies
329 Views
I'm working on Instrument cluster support for our CarPlay app. We already supported Dashboard and its working well. On the CarPlay simulator I see my Instrument cluster ok, but on the real car - not. I think, that were Apple Maps appear in Instrument Cluster - there and others app with Instrument Cluster support have to show, right? On the same car I see that Apple Maps showing in Instrument Cluster, but not my app. I've done everything from this video <key>CPSupportsInstrumentClusterNavigationScene</key> <true/> and even <key>UIApplicationSupportsMultipleScenes</key> <true/> What's else have to be done for showing my app in the Instrument Cluster?
Posted Last updated
.
Post marked as solved
1 Replies
252 Views
Hi, Hi, I would like to know if exists any way to set an icon for up next button of the CPNowPlayingTemplate. I read the CPNowPlayingTemplate documentation and I saw that we can set a text for this button. An app how implements this is Apple Music: Thanks!
Posted
by dbadaln.
Last updated
.
Post not yet marked as solved
1 Replies
338 Views
I have a driving task app and am trying to show a CPActionSheetTemplate or a CPAlertTemplate. Both of these are crashing showing: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unsupported object <CPActionSheetTemplate: 0x6000030319e0> <identifier: C744031B-99F6-4999-AF19-6ED43140502B, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to pushTemplate:animated:completion:. Allowed classes: {( CPSearchTemplate, CPNowPlayingTemplate, CPPointOfInterestTemplate, CPListTemplate, CPInformationTemplate, CPContactTemplate, CPGridTemplate, CPMapTemplate )}' This is very strange, because in the docs all app types are allowed to show ActionSheets and Alerts. Why is this crashing?
Posted
by zedsaid.
Last updated
.
Post not yet marked as solved
0 Replies
284 Views
Hi, The Car Kit Apple introduced recently is it a separate OS or what ? I mean how can I develop and deploy a whole new designed Car Info System and dashboards same as the designs Apple published last year ? Kindest Regards
Posted Last updated
.
Post not yet marked as solved
1 Replies
662 Views
Hi, I have a couple of doubts. Can information layout be used for driving task? In the guidelines is stated "The information template can be used by communication, EV charging, parking, navigation, and quick food ordering apps." (hence, driving task is not part of this list) correct? in the Apple guidelines is stated "driving task and quick food ordering apps are limited to 2 templates". Then, it also says that the tab bar layout "allows up to 4 tabs for audio apps and up to 5 tabs for all other app types". What does this mean? Is it possible to use the tab bar layout with more than two levels of hierarchy within the driving task, or should I use it with a limit of two? Moreover, if the limit is two, do I have to also count the tab bar as one and, therefore, use just one other layout in addition as the maximum allowed number? thanks
Posted
by gterrasi.
Last updated
.
Post not yet marked as solved
1 Replies
585 Views
CarPlay Simulator not receiving microphone input (Siri) Running carplay simulator Version 1.1 (480.26) Running on: M1 Macbook Pro running macOS Ventura 13.3.1 Connected to: iPhone 13 pro max running iOS 16.4 (20E246) When launching Siri by "Hey Siri", the, the siri indicator apppears and I am able to communicate and send a command, such as "send a text". Then, the Siri will say "who do you want to message", but it is no longer able to hear my voice as input.
Posted
by DannyG72.
Last updated
.