Add CarPlay support to your navigation app using CarPlay.

Posts under CarPlay tag

113 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

CarPlay on IOS 18
When connecting a phone on iOS 18 to CarPlay, the audio system of my car works with small freezes, especially when making calls via phone. Artifacts appear on the screen of the car's head unit and everything works in slow motion. I hope this is an iOS 18 error and it will be fixed
2
1
236
Sep ’24
carplay audio lost after ios18
Iphone 13mini updated to ios18. Carplay is wired on my 2021 RAM Laramie. After the update => Premium audio is lost, I can only hear low quality audio. When I manually change to Bluetooth instead of usb on the car, then audio comes in speaker mode on my phone and not on the truck.
2
2
250
Sep ’24
Ios18 CarPlay/BlueTooth issues
I recently updated my iOS operating system to the latest iOS18. Immediately after updating my CarPlay begin having issues. I began Troubleshooting and came up with some conclusions. If anyone can help that would be amazing. When NOT connected to carplay via cable, the Bluetooth works perfectly. When connected via cable to CarPlay the system is does not recognize Bluetooth. The phone begins to play through speakerphone, radio turns on and is playing in background. please help fix this issue. I can not have carplay not working along with Bluetooth in vehicle.
2
0
1k
Sep ’24
Content items not updating when using MediaPlayer API for CarPlay on iOS18
We are using the MediaPlayer API to provide CarPlay support. Starting in iOS 18 we are having issues updating the content list. The initial list of items will populate on a fresh instance but soon there after an error will show up saying we are not entitled to "com.apple.mediaremote.external-artwork-validation". From that point onwards no changes we make to our MPPlayableContentDataSource are reflected in CarPlay. Even after restarting the device. While the MediaPlayer API is marked as deprecated, we are still using it to provide CarPlay support going back to iOS 10. Has anyone else run into this or have suggestions for workarounds?
3
1
414
Oct ’24
Prerequesities for an App to be approved for CarPlay?
We're developing an app for emergency forces for years now. The App is used by thousands of volunteer fire fighters and medical emergency response forces on a daily basis. We want to enable our app to be available in carplay too. The app offers details about an event the emergency staff gets alerted for and also offers routing to the location of the event. Does anybody know the prerequsities to get an app approved for being available and published for CarPlay? Regards Boxson
1
0
226
Sep ’24
CPVoiceControlState repeating image?
I am trying to use CPVoiceControlState and include an animated image, but for the life of me I cannot figure out what sort of image it wants. I have tried animated .gif, .png, a static image, an image sequence and none seem to animate. Here is what I am using with an animated .png: func showLoadingTemplate() { enum VoiceControlStates: String { case loading = "loading" } let spinner = UIImage(named: "spinner") loadingTemplate = CPVoiceControlTemplate(voiceControlStates: [ CPVoiceControlState(identifier: VoiceControlStates.loading.rawValue, titleVariants: [NSLocalizedString("Loading...", comment: "CarPlay: Loading")], image: spinner, repeats: true) ]) loadingTemplate?.activateVoiceControlState(withIdentifier: VoiceControlStates.loading.rawValue) if let loading = loadingTemplate { currentInterfaceController?.presentTemplate(loading, animated: true, completion: { (result: Bool, error: Error?) in }) } } This shows the image but it isn't animating. Can anyone let me know what sort of image needs to be used in order to get it to animate? I have seen animated images working in Waze and Google Maps so if must be possible.
1
0
235
Sep ’24
Using CPVoiceControlTemplate in my CarPlay app to capture voice
I have a CarPlay navigation app and I would like to allow the user to speak an address and have our app search at that location. In the Waze app, it provides a button to tap, then it brings up a CPVoiceControlTemplate and you can give it directions or a location and it will then show you search results including the text you spoke as the title. I assume that app would have the same limitations as I do, so I am wondering how another app might do this? It was suggested that I use an App Intent with suggested phrases and then a Shortcut could perform the action. Is there documentation on this somewhere or am I going in the wrong direction here? Obviously Waze is doing what I am wanting so there must be a way. Can anyone point me in the right direction?
2
1
408
Sep ’24
Seeking Solutions: Distributing iOS Apps with CarPlay Entitlement via Enterprise Profiles
Dear Apple Developer Support Team, We are seeking a solution that would allow us to include the CarPlay entitlement while distributing our app using an enterprise profile. Could you please provide guidance on how we might achieve this? Are there any alternative approaches or considerations that could help us navigate this limitation? Your expertise and advice would be greatly appreciated as we work to ensure our app meets the needs of our users while complying with Apple’s guidelines. Thank you for your time and support.
0
0
334
Sep ’24
CarPlay - is it feasible?
Hi, I have an app that uses GPS, to locate you, then retrieves a unique ID and then shows you: Location Name Unique ID Latitude & Longitude As you move around, this information is updated within the apps UI. The UI is just a card, with no map and the user is unable to change what is displayed, without moving location. I am wanting to integrate with CarPlay, so the users don't need to touch their device while in a moving car. Am I able do the following within the CarPlay Guidelines?, Display the unique ID Update the ID as the car moves Record a distance between two unique ID's (as the car is moving via a "Start" & "Stop" button) When I look at the CarPlay developer documentation, there is no clear guide on what template to use. Navigation or POI. There is also limited guidance on CarPlay development, so any tips/advice is greatly appreciated. Thanks Hayden
0
0
231
Aug ’24
CarPlay Map Displays White Screen
Hello, I'm somewhat new to CarPlay integration and am having an issue. I have ready through Apple's CarPlay Programming Guide, reviewed their code samples and have exhausted my searches online to help find a solution to my problem. I have been unable to get a basic map to display on my CarPlay map utilizing the following: import CarPlay class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { var interfaceController: CPInterfaceController? var window: CPWindow? func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) { self.interfaceController = interfaceController let mapTemplate = CPMapTemplate() mapTemplate.mapDelegate = self interfaceController.setRootTemplate(mapTemplate, animated: true, completion: { success, error in if let error = error { debugPrint("Error: \(error)") } else { print("CarPlay Map Should Be Displayed") } }) let trip = CPTrip(origin: MKMapItem(placemark: .init(coordinate: CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0))), destination: MKMapItem(placemark: .init(coordinate: CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0))), routeChoices: []) mapTemplate.startNavigationSession(for: trip) } } extension CarPlaySceneDelegate: CPMapTemplateDelegate { func mapTemplate(_ mapTemplate: CPMapTemplate, panWith direction: CPMapTemplate.PanDirection) { // Handle panning } func mapTemplate(_ mapTemplate: CPMapTemplate, startedTrip trip: CPTrip, using routeChoice: CPRouteChoice) { // Handle trip start } } I have my CarPlay Entitlements setup, I have my CarPlay Navigation App set in my signing and capabilities and my app icon displays properly on CarPlay (both in simulator and inside of my vehicle). However, as mentioned I only get a white screen. Now, if I utilize the following code, I will get my map to display, however I lose functionality such as panning the map. I'm sure that I am missing something simple on the above example and appreciate any guidance that you may have. func createMapTemplate(destination: TripDetails?, destinationBL: BucketListItems?, route: MKRoute, window: UIWindow) -> CPMapTemplate { mapTemplate = CPMapTemplate() mapTemplate.mapDelegate = self trip = nil let startLocation = CLLocation(latitude: location.coordinate.latitude, longitude: location.coordinate.longitude) let startMapItem = MKMapItem(placemark: MKPlacemark(coordinate: startLocation.coordinate)) startMapItem.name = "Starting Location" let endMapItem = MKMapItem(placemark: MKPlacemark(coordinate: route.polyline.points()[route.polyline.pointCount - 1].coordinate)) endMapItem.name = destination?.campgroundName != nil ? destination!.campgroundName : destinationBL!.name // Create the hosting controller for the SwiftUI view let mapViewController = UIHostingController(rootView: CarPlayMapView(templateManager: self)) window.rootViewController = mapViewController window.makeKeyAndVisible() let routeChoice = createCPRouteChoice(from: route) trip = CPTrip(origin: startMapItem, destination: endMapItem, routeChoices: [routeChoice]) mapTemplate(mapTemplate, selectedPreviewFor: trip!, using: routeChoice) mapTemplate.showTripPreviews([trip!], textConfiguration: nil) return mapTemplate }
1
0
379
Aug ’24
CarPlay / Siri: single message display
We have an app with carplay-messaging capability, and have successfully integrated our app in order to read out the list of unread messages. However, if a single message arrives and our push notification appears, we are not able to have the Siri UI automatically read only that single message or announce it. The 'list' UI appears (siri: "would you like to read your messages...") when tapping the notification, whereas we would like the 'item' UI to appear immediately with the "reply, repeat, don't reply" buttons. Our intent handler service looks like this - basically the auto-generated one for a new Intent Handler Extension: import Intents // As an example, this class is set up to handle Message intents. // You will want to replace this or add other intents as appropriate. // The intents you wish to handle must be declared in the extension's Info.plist. // You can test your example integration by saying things to Siri like: // "Send a message using <myApp>" // "<myApp> John saying hello" // "Search for messages in <myApp>" class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling { override func handler(for intent: INIntent) -> Any { // This is the default implementation. If you want different objects to handle different intents, // you can override this and return the handler you want for that particular intent. return self } // MARK: - INSendMessageIntentHandling // Implement resolution methods to provide additional information about your intent (optional). func resolveRecipients(for intent: INSendMessageIntent, with completion: @escaping ([INSendMessageRecipientResolutionResult]) -> Void) { if let recipients = intent.recipients { // If no recipients were provided we'll need to prompt for a value. if recipients.count == 0 { completion([INSendMessageRecipientResolutionResult.needsValue()]) return } var resolutionResults = [INSendMessageRecipientResolutionResult]() for recipient in recipients { let matchingContacts = [recipient] // Implement your contact matching logic here to create an array of matching contacts switch matchingContacts.count { case 2 ... Int.max: // We need Siri's help to ask user to pick one from the matches. resolutionResults += [INSendMessageRecipientResolutionResult.disambiguation(with: matchingContacts)] case 1: // We have exactly one matching contact resolutionResults += [INSendMessageRecipientResolutionResult.success(with: recipient)] case 0: // We have no contacts matching the description provided resolutionResults += [INSendMessageRecipientResolutionResult.unsupported()] default: break } } completion(resolutionResults) } else { completion([INSendMessageRecipientResolutionResult.needsValue()]) } } func resolveContent(for intent: INSendMessageIntent, with completion: @escaping (INStringResolutionResult) -> Void) { if let text = intent.content, !text.isEmpty { completion(INStringResolutionResult.success(with: text)) } else { completion(INStringResolutionResult.needsValue()) } } // Once resolution is completed, perform validation on the intent and provide confirmation (optional). func confirm(intent: INSendMessageIntent, completion: @escaping (INSendMessageIntentResponse) -> Void) { // Verify user is authenticated and your app is ready to send a message. let userActivity = NSUserActivity(activityType: NSStringFromClass(INSendMessageIntent.self)) let response = INSendMessageIntentResponse(code: .ready, userActivity: userActivity) completion(response) } // Handle the completed intent (required). func handle(intent: INSendMessageIntent, completion: @escaping (INSendMessageIntentResponse) -> Void) { // Implement your application logic to send a message here. let userActivity = NSUserActivity(activityType: NSStringFromClass(INSendMessageIntent.self)) let response = INSendMessageIntentResponse(code: .success, userActivity: userActivity) completion(response) } // Implement handlers for each intent you wish to handle. As an example for messages, you may wish to also handle searchForMessages and setMessageAttributes. // MARK: - INSearchForMessagesIntentHandling func handle(intent: INSearchForMessagesIntent, completion: @escaping (INSearchForMessagesIntentResponse) -> Void) { // Implement your application logic to find a message that matches the information in the intent. let userActivity = NSUserActivity(activityType: NSStringFromClass(INSearchForMessagesIntent.self)) let response = INSearchForMessagesIntentResponse(code: .success, userActivity: userActivity) // Initialize with found message's attributes response.messages = [INMessage( identifier: "identifier", conversationIdentifier: "convo1", content: "I am so excited about SiriKit!", dateSent: Date(), sender: INPerson(personHandle: INPersonHandle(value: "sarah@example.com", type: .emailAddress), nameComponents: nil, displayName: "Sarah", image: nil, contactIdentifier: nil, customIdentifier: nil), recipients: [INPerson(personHandle: INPersonHandle(value: "+1-415-555-5555", type: .phoneNumber), nameComponents: nil, displayName: "John", image: nil, contactIdentifier: nil, customIdentifier: nil)], messageType: .text )] completion(response) } // MARK: - INSetMessageAttributeIntentHandling func handle(intent: INSetMessageAttributeIntent, completion: @escaping (INSetMessageAttributeIntentResponse) -> Void) { // Implement your application logic to set the message attribute here. let userActivity = NSUserActivity(activityType: NSStringFromClass(INSetMessageAttributeIntent.self)) let response = INSetMessageAttributeIntentResponse(code: .success, userActivity: userActivity) completion(response) } } Is there specific configuration required to allow display of a single message via tapping on the notification?
3
0
393
Sep ’24
CarPlay fix
I have had the sage issue with ever beta since ios16. Resetting my cars infotainment system seems to fix it. Unsure about other cars, but if I reset my Mazda system by holding the music button, nav, and volume button (mute), for 15-20 seconds, it works again after the recor reboot
0
0
203
Aug ’24