Hi,
I'm building an aftermarket solution to enable Apple Maps to support EV routing for any EV.
I am going through the documentation and found some gaps - does anyone know how the following properties work?
INGetCarPowerLevelStatusIntentResponse - consumptionFormulaArguments
INGetCarPowerLevelStatusIntentResponse - chargingFormulaArguments
Is there a working example that anyone has seen?
Many thanks
Posts under CarPlay tag
131 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am developing a CarPlay app, that has been approved for EV Charging entitlement. Could you please confirm if the given entitlement supports CPSearchTemplate template as there is some confusion here.
I tried using the template by referring to the below link,
https://developer.apple.com/documentation/carplay/cpsearchtemplate
Here is the snippet,
class SearchCPView: UIResponder, CPSearchTemplateDelegate {
var searchTemplate: CPSearchTemplate = CPSearchTemplate()
override init() {
super.init()
searchTemplate.delegate = self
}
func getSearchTemplate(interfaceController: CPInterfaceController?) -> CPGridTemplate {
let searchGridButton = CPGridButton(titleVariants: [CarplayButtonTitles.search], image: UIImage(named: ImagesConstants.CarPlay.searchGrid) ?? UIImage(), handler: {[self] _ in
guard let controller = interfaceController else { return }
controller.pushTemplate(self.searchTemplate, animated: true) { status, error in
print(status)
}
})
let gridTemplate = CPGridTemplate(title: "", gridButtons: [searchGridButton])
return gridTemplate
}
func searchTemplate(_ searchTemplate: CPSearchTemplate, selectedResult item: CPListItem) async {
print(item)
}
func searchTemplate(_ searchTemplate: CPSearchTemplate, updatedSearchText searchText: String) async -> [CPListItem] {
print(searchText)
return [CPListItem(text: "", detailText: "")]
}
}
On push, I am getting an exception,
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unsupported object <CPSearchTemplate: 0x30056df00> <identifier: 28, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to pushTemplate:animated:completion:. Allowed classes: {(
CPTabBarTemplate,
CPActionSheetTemplate,
CPAlertTemplate,
CPGridTemplate,
CPPointOfInterestTemplate,
CPInformationTemplate,
CPContactTemplate,
CPListTemplate
)}'
I recently installed a rear-view camera in my car, and ever since, I've been experiencing a frustrating issue with my CarPlay. After about 15 seconds of playing audio via Bluetooth, the sound stops coming out of the speakers, even though the song continues to run in the background.
For context, my stereo system is an aftermarket unit that I installed to enable CarPlay functionality. Everything worked perfectly before adding the rear-view camera. Unfortunately, my unit does not have a port for a wired connection, so I can't test the audio using a cable.
Has anyone experienced a similar issue? Could the camera installation be interfering with the Bluetooth or audio system somehow? Any advice or troubleshooting tips would be greatly appreciated!
I have developed a mobile app using SwiftUI. Now I am in the process of building a CarPlay application. I know how to test the CarPlay app using a simulator but here is my confusion,
Testing the iPhone app and CarPlay together (few scenarios like user login / logout, location enabled /disabled in the mobile app)
Kindly help me validate the above scenarios as I am getting black screen on iPhone whenever the CarPlay is launched. Below is the code snippet,
func application(_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions) -> UISceneConfiguration {
if connectingSceneSession.role == .carTemplateApplication {
let sceneConfiguration = UISceneConfiguration(name: "CarPlay Scene", sessionRole: connectingSceneSession.role)
sceneConfiguration.delegateClass = CarPlaySceneDelegate.self
return sceneConfiguration
}
// Configuration for other types of scenes
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(.light)
}
}
}
Info.plist
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>CarPlay Scene</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
I bought a new iPhone 16 recently and connected with my car (Hyundai Venue) I couldn't able to see WhatsApp. I researched and found some forum, but the suggested steps are not workable or not suitable for latest iOS version.
I have updated iOS and WhatsApp, nothing helped to resolve.
Note: Earlier I was used Pixel phone I can able to see Whatsapp and I can make a call
I have developed a mobile app using SwiftUI. Now I am in the process of building a CarPlay application. I know how to test the CarPlay app using a simulator but here is my confusion,
How to test the iPhone app and CarPlay together? I want to test few scenarios like, user login / logout from mobile app. Location enabled /disabled in the mobile app.
I know that swiftUI handles the scenes by itself. Kindly help me validate the above scenarios as I am getting black screen on iPhone whenever the CarPlay is launched. Below is the code snippet,
func application(_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions) -> UISceneConfiguration {
if connectingSceneSession.role == .carTemplateApplication {
let sceneConfiguration = UISceneConfiguration(name: "CarPlay Scene", sessionRole: connectingSceneSession.role)
sceneConfiguration.delegateClass = CarPlaySceneDelegate.self
return sceneConfiguration
}
// Configuration for other types of scenes
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(.light)
}
}
}
Info.plist
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>CarPlay Scene</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
I bought Pioneer SPH-DA97DAB CarPlay radio but hardly can use the phone due to a loud echo that the caller hears during a call. how can I solve this does CarPlay has echo cancelation?
I have developed a mobile app using SwiftUI that supports GoogleMaps. Now I am in the process of building a CarPlay application. I assume CarPlay only supports Apple MapKit, as I could not find any way to integrate the Google Maps. Below are few queries,
Could you please guide me on how I can obtain the user's current location on the CarPlay app launch? Is there a way CarPlay can get the details from the mobile app(not pretty sure as its using Google Maps)?
If the user is logged out from the mobile app, what is the flow in CarPlay? Do we have any standard login page asking user to login to the mobile app first?
Is there any UI asking the user to capture the location in CarPlay?
This is my first CarPlay app. Kindly guide me to a document or so that covers these details.
Thanks a ton!!
I am new to CarPlay development. I am working on an app that has four tabs. The first tab has a POI template. I make an API call, once the data is received, I need to refresh the POI template to display the data received. Below is a sample code. Please guide me on this. Right now I am pushing a new template once data is obtained which is not the right behaviour
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) {
self.interfaceController = interfaceController
let tabs = CPTabBarTemplate(templates: [firstTab(), secondTab(), thirdTab(), fourthTab()])
interfaceController.setRootTemplate(tabs,
animated: true,
completion: nil)
}
func firstTab() -> CPTemplate {
// Placeholder template while data is loading
let placeholderPOI = CPPointOfInterest(location: MKMapItem(placemark: MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0))),
title: "Loading...",
subtitle: "",
summary: "Data is currently loading",
detailTitle: "",
detailSubtitle: "",
detailSummary: "",
pinImage: nil)
let placeholderTemplate = CPPointOfInterestTemplate(title: "EV Stations", pointsOfInterest: [placeholderPOI], selectedIndex: 0)
// Asynchronously update the template once data is loaded
Task {
await loadAndUpdateTimeConsumingData(for: placeholderTemplate)
}
return placeholderTemplate
}
func loadAndUpdateTimeConsumingData(for template: CPPointOfInterestTemplate) async {
do {
// Simulate a 1-minute delay
try await Task.sleep(nanoseconds: 60 * 1_000_000_000)
// Mock data
let stations = [Station1(name: "Station 1", city: "City A", address: "123 Lane", coordinates: (latitude: 12.3456, longitude: 76.7890))]
let pointsOfInterest = stations.map { station -> CPPointOfInterest in
let mapItem = MKMapItem(placemark: MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: station.coordinates.latitude, longitude: station.coordinates.longitude)))
return CPPointOfInterest(location: mapItem,
title: station.name,
subtitle: station.city,
summary: station.address,
detailTitle: "",
detailSubtitle: "",
detailSummary: "",
pinImage: nil)
}
// Update the template
let poiTemplate = CPPointOfInterestTemplate(title: "EV Stations", pointsOfInterest: pointsOfInterest, selectedIndex: 0)
await MainActor.run {
self.interfaceController?.pushTemplate(poiTemplate, animated: true, completion: nil)
}
} catch {
}
}
Hi everyone,
I'm developing a CarPlay application and using a CPTabBarTemplate to display multiple tabs. I want to determine which tab is selected when the user clicks on a tab, specifically when switching to the second tab.
Here’s the relevant part of my code:
class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
var interfaceController: CPInterfaceController?
var tabBarTemplate: CPTabBarTemplate = CPTabBarTemplate(templates: [])
func templateApplicationScene(
_ templateApplicationScene: CPTemplateApplicationScene,
didConnect interfaceController: CPInterfaceController
) {
self.interfaceController = interfaceController
// Create and set the TabBarTemplate
let tabBarTemplate = createTabBarTemplate()
self.tabBarTemplate = tabBarTemplate
interfaceController.setRootTemplate(tabBarTemplate, animated: false) { success, error in
if let error = error {
print("Error setting TabBarTemplate: \(error.localizedDescription)")
} else {
print("TabBarTemplate set successfully.")
}
}
}
func createTabBarTemplate() -> CPTabBarTemplate {
let listItem1 = CPListItem(text: "Item 1", detailText: "Detail 1")
let listItem2 = CPListItem(text: "Item 2", detailText: "Detail 2")
let listTemplate = CPListTemplate(
title: "List",
sections: [CPListSection(items: [listItem1, listItem2])]
)
let gridButton1 = CPGridButton(
titleVariants: ["Grid 1"],
image: UIImage(systemName: "star.fill")!
)
let gridButton2 = CPGridButton(
titleVariants: ["Grid 2"],
image: UIImage(systemName: "star")!
)
let gridTemplate = CPGridTemplate(
title: "Grid",
gridButtons: [gridButton1, gridButton2]
)
return CPTabBarTemplate(templates: [listTemplate, gridTemplate])
}
}
After buying iPhone 16 pro max I’ve had glitches with many things, including carplay, eventually it stopped working altogether. Now it says charging but wont connect to carplay. Ive downloaded the new 18.1.1 reset my velar to factory infotainment, bought new cables, restarted the car, forget car etc. Nothing helps- this se ems to be a theme- including keyboard glitches? I NEED CarPlay as I travel often!! Please fix this- or give me some ideas on how I can!
Just got a new 16 Pro and set it up Monday 11/20. It was on 18.1 and everything worked fine. I accidentally updated to 18.1.1 (didn't turn off auto update) 12/2 and now Carplay doesn't work. I have to use a cord in my car for carplay. I have tried all the suggestions listed online and nothing works. I tried to erase my iPhone to go back to 18.1 but in the set up process it showed updated to 18.1.1 with no option to refuse. Incredibly frustrating and so many others have this issue! How was this not caught during beta testing????
This post was rejected from the apple forum and they sent an email saying it contained beta information. 18.1.1 shouldn't be considered beta and if it is then why was it pushed out to my phone? I didn't want a beta testing!
After upgrading to IOS 18.1.1 CarPlay became terrible.
During music playback via USB cable the subwoofer stopped working. Bass is not heard. Sound became very poor. It is impossible to exit CarPlay by pressing the button on the multimedia. if I Disconnect the cable from the phone - the multimedia (radio) works fine again and the subwoofer works normally.
CarPlay blocks pressing the keys on the multimedia system. Also it is not possible to update the multimedia, because multimedia menu is inaccessible.
When I connect the phone via Bluetooth the timer on the multimedia screen immediately starts, as if I am talking on the phone to somebody. Sound quality via Bluetooth is even worse than via USB.
Listening to music (the main function) has become impossible.
Please fix this problem.
Thank you very much!
Ever since updating to iOS18, CarPlay has been buggy for me. One of the constant issues is that after it connects, when I select an app (eg google maps or Spotify), the entire app will freeze. This happens regardless of the app I choose. Nothing on the app will be responsive unless I use the physical car controls to back out of the app. Once I’m on the main view of carplay (where it shows all the apps or where it shows the maps/audio mixes screen) then carplay becomes responsive again. But since I can’t use any of the apps as soon as I select one, I have to reboot my phone to resolve the issue. However, the issue will just happen again ok a subsequent attempt to connect. Some times it will work ok, probably happens again every 2-3 times I connect. This never happened prior to iOS18.
Any suggestions?
For years every time I click on the phone app in my car it use to show resent calls now it opens favourites by default. how can I change it?
I'm tryng to develop a software that can connect an iPhone to a HMI Box in order to use CarPlay and test an app for CarPlay.
Since the starting point is to ask the device, i.e. the iPhone, if it supports CarPlay, I have to write a USB Vendor-Specific Request that the accessory send to know for this capability.
I would like to know what are the specific parameters to include in the control transfer request from accessory to device, especially: bRequest, wValue, wIndex. I've studied the whole Accessory Interface Specification Carplay Addendum, but i couldn't find anything.
Thanks in advance for your support.
We are experiencing an infrequent issue with the handoff between our Siri intent, our iOS app, and our CarPlay extension. Siri correctly understands the request, and the
handler(for intent: INIntent)
method is called. In the final step, we respond using:
INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
with an instance of NSUserActivity initialized as:
NSUserActivity(activityType: "our.unique.StartCallIntent")
This "our.unique.StartCallIntent" type is included in the app’s NSUserActivityTypes attribute within the Info.plist.
The callback is handled in the main view of the app through:
view.onContinueUserActivity("our.unique.StartCallIntent", perform: handleSiriIntent)
Additionally, we handle the callback in the CarPlay extension using:
func scene(_: UIScene, continue userActivity: NSUserActivity)
This is necessary because when Siri is invoked while CarPlay is active, the CarPlay extension should receive the callback.
Most of the time, both callbacks are triggered as expected. However, on rare occasions, the handoff fails, and neither onContinueUserActivity nor scene(_: UIScene, continue userActivity:) receives a callback from the Siri intent.
Is this a known issue? If so, are there any guidelines or best practices for ensuring that our Siri intent handoff consistently triggers the callbacks?
I am really hoping somebody can help. I in the process of having our app relaunched with CarPlay and a few other features. However, after nearly 4 weeks I've still not had confirmation of Carplay being accepted. I've submitted several times without any response. When I've contacted Apple Support I simply get a generic reply (see below)
Hello Gareth,
CarPlay apps are editorially selected, you will be contacted if your app is selected to proceed.
If you have already submitted your request to have your app support CarPlay, there is no actions needed. Estimates and status updates are not available.
Please let us know if you have any questions or need further assistance.
I m unable to connect CarPlay to Mercedes GLC 2024 with Apple 15PMX. Made all recommendations by Apple, renew the car's sw too. It didn't work despite I tried many times. Funny that my iPhone 11 connects flawlessly both with cord or wireless.
However my iPhone 15PMX does connect to any other cars too either with cable or wireless.
Is it a bug or a really inability?
Hi there;
Apple CarPlay has some issues after updating IOS18. Initially when updated to 18.01 Carplay Maps stopped responding, cannot Mute or unmute voice, cursor doesn’t allow, cannot navigate. After updating it to 18.1 maps still continue to behave unresponsive. 18.1 has also affected other application response. This is dangerous given CarPlay stops responding during driving. I am driving an Acura MDX.