Add CarPlay support to your navigation app using CarPlay.

CarPlay Documentation

Posts under CarPlay tag

92 Posts
Sort by:
Post marked as solved
1 Replies
183 Views
I want to create a CPListImageRowItem/CPGridTemplate for the audio app which supports from iOS 13. for iOS14 and above I can able to do that with CPGridTemplate/ CPListImageRowItem but in iOS 13 how can we do? Because to support audio app from iOS13 I am using MPPlayableContentManager. So, are we able to achieve it iOS 13? Grid Should look like below image Please Suggest any way to achieve this kind of design? Thanks in advance.
Posted
by
Post marked as solved
2 Replies
196 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
by
Post not yet marked as solved
0 Replies
232 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
Post not yet marked as solved
0 Replies
391 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
Post marked as solved
1 Replies
667 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
Post not yet marked as solved
2 Replies
334 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
by
Post not yet marked as solved
0 Replies
179 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
by
Post not yet marked as solved
0 Replies
246 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
Post not yet marked as solved
0 Replies
312 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
Post not yet marked as solved
0 Replies
495 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?
Post not yet marked as solved
0 Replies
344 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
Post not yet marked as solved
0 Replies
432 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
by
Post marked as solved
1 Replies
328 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
Post not yet marked as solved
0 Replies
370 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
by
Post not yet marked as solved
1 Replies
406 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
Post not yet marked as solved
1 Replies
613 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
Post not yet marked as solved
0 Replies
269 Views
使用苹果X手机,版本号16.3.1,连接不同android 10 平台上集成的carplay都能连接成功,但是其中一个平台苹果X手机的蓝牙详情中不显示carpaly车载选项按钮,忽略蓝牙也没有办法断开carpaly连接。
Posted
by
Post marked as solved
1 Replies
342 Views
We have an app with CarPlay support. There you can preview a trip and start it. However, if we start a trip (see eta and manoeuvres), then turn off the car (or tap disconnect in CarPlay Simulator), then turn it again - CarPlay launched, but there's no eta panel and manoeuvres in it. Even if cancel this trip and start new. Only after relaunch the app eta and manoeuvres appear again. Is someone experienced something similar? Maybe this is because some misunderstunding in CarPlay workflow?
Posted
by
Post not yet marked as solved
1 Replies
346 Views
Since iOS 17 is out I am getting crashes in my Driving Task CarPlay app. It is as if the System tried to push a CPNowPlayingTemplate to my app, and that template, according to the documentation, is not allowed for a Driving Task CarPlay app. I get the following error: Fatal Exception: NSInvalidArgumentException Unsupported object <CPNowPlayingTemplate: 0x283944c60> <identifier: 3195B357-D184-41BF-91CA-399C5810A8EA, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to pushTemplate:animated:completion:. Allowed classes: {( CPInformationTemplate, CPListTemplate, CPAlertTemplate, CPActionSheetTemplate, CPTabBarTemplate, CPGridTemplate, CPPointOfInterestTemplate )} My app, from time to time, plays some sounds to warn the driver about issues in the road. Maybe that can trigger (in which cases?) the now playing template to be pushed to my app. Is this an iOS 17 bug? Is there a way to work around it? Thank you.
Posted
by
Post not yet marked as solved
0 Replies
282 Views
I am currently working on an iOS application that provides a range of services, including both emergency services (e.g., fire, medical emergencies) and non-emergency services (e.g., patient transportation to hospitals). Now, I am looking to extend the functionality to CarPlay, and I have a few questions regarding the suitable category and template for CarPlay development. CarPlay Category: Considering the nature of our application which covers both emergency and non-emergency services, I'm wondering which CarPlay category is most appropriate for our use case. Should we go for the "Navigation" category or another category that aligns better with our service offerings? Our application requires users to register cases for emergency or non-emergency services, and we provide services exclusively for registered cases. Additionally, we have predefined limited locations for pick-up and drop-off. Given these considerations, would the "Navigation" category be feasible for our application on CarPlay, considering the need for location-based services and step-by-step navigation to predetermined destinations? CarPlay Template: I would like to know which CarPlay template would be best suited for our application. Are there specific templates optimized for emergency services or transportation services on CarPlay? If we choose the CarPlay Navigation category, the CPMapTemplate is available to render the custom map. However, for our CarPlay application, we plan to introduce additional features alongside map navigation. Specifically, we intend to set driver and crew member information within the CarPlay application. This includes vehicle details, crew member details, and shift timings for crew members. Our system assigns cases to a particular driver based on this information. The app flow we are considering involves using the CPTabBarTemplate, which includes 3-4 tabs for shift details, vehicle information, etc. One of the tabs will display the map for step-by-step navigation. We have reviewed the CarPlay Navigation programming guidelines, which mention that on the base view, only the map can be rendered, and other UI elements cannot be displayed. However, in our case, the root template is CPTabBarTemplate rather than the CPMapTemplate. I am wondering if this approach could potentially create any issues during the Apple App Store approval process? Our primary concern stems from our initial belief that the Navigation category, with its extensive support for built-in templates, would allow us to implement a TabBar. Our intention was to incorporate the CPMapTemplate within one of the tab items. However, this approach seems to contradict the CarPlay Navigation programming guidelines. Step-by-Step Navigation: For the non-emergency services, specifically patient transportation, we need to provide step-by-step navigation for drivers while picking up and dropping off patients at nearby locations or hospitals. Are there specific CarPlay features or APIs that facilitate seamless step-by-step navigation within the CarPlay interface? Must-Have Features: In the context of CarPlay development for emergency and non-emergency services, are there any must-have features or guidelines that we should consider integrating into our CarPlay interface, especially for step-by-step navigation during patient transport? I appreciate any insights, experiences, or recommendations from developers who have worked on similar projects or have expertise in CarPlay development. Thank you!
Posted
by