Can I launch a CarPlay Communication app on the XCode CarPlay simulator?

Can I launch a CarPlay Communication app on the XCode CarPlay simulator?

I created a CarPlay example app that include the following entitlements.

com.apple.developer.carplay-communication
com.apple.developer.carplay-messaging
com.apple.developer.carplay-calling
com.apple.developer.siri

My app is implemented by simple "Tab bar" and "Contact" templates.
According to the following guide, Communication App supports "Tab bar" and "Contact" templates.
https://developer.apple.com/carplay/documentation/CarPlay-App-Programming-Guide.pdf

However my CarPlay Communication example app doesn't work on the CarPlay simulator.
My app icon doesn't show CarPlay screen of simulator.

On the other hand, I changed the entitlement of my app to "com.apple.developer.carplay-maps".
Then, my CarPlay navigation example app works fine on the CarPlay simulator.

Do I need to set any additional settings other than "Entitlement" to launch the Communication app on the simulator?
Or, do I need to get approval by the following URL?
https://developer.apple.com//contact/carplay/

Xcode version : 12.0 or 12.1
Simulator iOS version : 14.0 or 14.1
Answered by y-sawai in 644999022

In case of "calling", I think we must implement the following intents.
https://developer.apple.com/documentation/sirikit/instartaudiocallintent
https://developer.apple.com/documentation/sirikit/insearchcallhistoryintent

I added "INStartAudioCallIntent" and "INSearchCallHistoryIntent" to the info.plist.
My communication app appears on the CarPlay screen of the real device and the Simulator.

I think that our problem was solved.

I changed #6 step and tried.

#6 Add an Intents App Extension to your project

Choose Xcode [File] > [New] > [Target...] and select "Intents Extension".
Product Name: myintentextension
Language: Swift
Starting Point: None <-- changed


I changed "Starting Point" value to "None".
And I added "INStartAudioCallIntent" and "INSearchCallHistoryIntent" to the info.plist of "myintentextension" manually.

info.plist (Information Property List)
--> NSExtension
--> NSExtensionAttributes
--> IntentsSupported (Add "INStartAudioCallIntent" and "INSearchCallHistoryIntent")

In case of "Messaging",  I think that it need to add "INSearchForMessagesIntent" and "INSendMessageIntent".
Try this:
• Regenerate your App ID and provisioning profiles.
• Clean Xcode, manually import your provisioning profiles and manually sign your app. 
• Try a bundle ID that doesn't include the word CarPlay (this is last thing to try and would clearly be a bug in Xcode).
I appreciate for your support.

• Regenerate your App ID and provisioning profiles.
• Clean Xcode, manually import your provisioning profiles and manually sign your app.

Although I have requested the CarPlay Communication app entitlement at the following URL,
I have not been approved it by Apple yet.
https://developer.apple.com//contact/carplay/

So I cannot create provisioning profiles that is added the CarPlay Communication entitlement.

I understand that the provisioning profile is required for installation app on the real iphone device.
Do I need the approval of Apple to run my CarPlay Communication app on the simulator, too?
Can I launch my CarPlay Communication app on the CarPlay "Simulator" without the provisioning profile?

In case of "com.apple.developer.carplay-maps", my app icon shows on the CarPlay screen of simulator.

• Try a bundle ID that doesn't include the word CarPlay (this is last thing to try and would clearly be a bug in Xcode).

I changed a bundle ID and run my app on the simulator.
But my app icon doesn't show CarPlay screen of simulator.
Dear marek.labuzik

I appreciate your cooperation.

I have same problem:
https://developer.apple.com/forums/thread/664597

Just now, I am facing the same problem as you above that is a thread No.664597.

A few days ago, my request of the CarPlay Communication app entitlement was approved by Apple.
I have been able to create a provisioning profile includes the CarPlay Communication entitlement,
and install my app to real iPhone device.
But "MyApp not show in CarPlay" problem occurs in my environment, too.
I think this is the same as your problem.

The other day, you suggested the following solution for me.
Did you try the following steps and solve this problem??

I have tried the following , but this problem occurs.

Try this:
• Regenerate your App ID and provisioning profiles.
• Clean Xcode, manually import your provisioning profiles and manually sign your app.
• Try a bundle ID that doesn't include the word CarPlay (this is last thing to try and would clearly be a bug in Xcode).

My environment:
Xcode version : 12.0 or 12.1
iPhone iOS version : 14.0 or 14.1
I wrote to Apple. (TSIs)
Apple sent me a recommendation that I sent to you.

Try this:
• Regenerate your App ID and provisioning profiles.
• Clean Xcode, manually import your provisioning profiles and manually sign your app.
• Try a bundle ID that doesn't include the word CarPlay (this is last thing to try and would clearly be a bug in Xcode).


It didn't solve my problem.

Apple also proposes to base the ticket on: https://developer.apple.com/bug-reporting

Did you try to report a bug?
Do you have a bug number?
Dear marek.labuzik

Thank you for your reply.

Did you try to report a bug?
Do you have a bug number?

No, I didn't.
I have not reported a bug to "Feedback Assistant" yet.
Currently I'm confirming whether there are any other mistakes in my Xcode settings or not.
And I'm looking for another solution.
I was able to launch my communication app on the CarPlay simulator a while ago.
My communication app icon shows on the CarPlay screen.

However, in case of a real iphone device, my communication app doesn't work.

Although our problem has not been solved yet, I report the steps when it succeeds on the simulator.
When I tried the following additional step #3, my communication app worked on the CarPlay simulator.

#1 Create a CarPlay example app that include the following entitlements.
com.apple.developer.carplay-communication
com.apple.developer.carplay-calling
com.apple.developer.siri

#2 Implement the simple "Contact" templates" to "CarPlaySceneDelegate.swift".

#3 Create an intents App Extension described on the website below.
https://developer.apple.com/documentation/sirikit/creating_an_intents_app_extension
Refer to the following section.
  • Enable the Siri Capability

  • Add an Intents App Extension to Your Project

#4 Build and install my app to the simulator and run it.
My communication app icon shows on the CarPlay screen.

I think that our problem which our app doesn't work on the real device may be related to the implementation of Siri.
Dear marek.labuzik

However, in case of a real iphone device, my communication app doesn't work.

Sorry.
Above report is wrong. I was able to solve our problem !!
My CarPlay communication app icon shows on the CarPlay screen of the real iPhone device.

Please try the following step.
When I tried the following additional step #3, my CarPlay communication app worked fine on the real iPhone device.

#1 Create a CarPlay example app that include the following entitlements.
com.apple.developer.carplay-communication
com.apple.developer.carplay-calling
com.apple.developer.siri

#2 Implement the simple "Contact" templates" to "CarPlaySceneDelegate.swift".

#3 Create an intents App Extension described on the website below.
https://developer.apple.com/documentation/sirikit/creating_an_intents_app_extension
Refer to the following section.

  • Enable the Siri Capability

  • Add an Intents App Extension to Your Project

#4 Build and install my app to the simulator and run it.
My communication app icon shows on the CarPlay screen.

Not work for me.

What you implemented for siri?
I implement only INStartCallIntent.
CarPlaySceneDelegate implement CPTabBarTemplate with contacts and recents tabs.

Can you share your project with me, please?

I reported a bug to "Feedback Assistant".

Can you share your project with me, please?

Sorry, I cannot share my project because I work to create in my company.
Instead, I share more detailed procedure that I tried.

https://developer.apple.com/forums/thread/664597

I share the following procedure that uses above your code as an example.

#1 Create a new Xcode project

Choose a template for your new project: Select [iOS] -> [App]

Choose options for your new project:
Product Name : mytestapp
Organization Identifier: com.<your-name>
Interface: Storyboard
LifeCycle: UIKit App Delegate
Language: Swift

#2 Add an entitlement file to your project

Add new file from Xcode menu [File] -> [New] -> [File...]
And select [iOS] -> [Property List]
Save as: mytestapp.entitlements

mytestapp.entitlements like this
Code Block language
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.carplay-calling</key>
<true/>
<key>com.apple.developer.carplay-communication</key>
<true/>
<key>com.apple.developer.siri</key>
<true/>
</dict>
</plist>

And set entitlement file path to Build Settings.
Select [mytestapp] -> TARGETS [mytestapp] -> [Build Settings] -> [All]
Set "Code Signing Entitlements" to your entitlement file path.

#3 Edit "Info.plist"

Declare CarPlay scene to "Scene Configuration" like the following.
Code Block language
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>CPTemplateApplicationScene</string>
<key>UISceneConfigurationName</key>
<string>CarPlay Configuration</string>
<key>UISceneDelegateClassName</key>
<string>${PRODUCT_MODULE_NAME}.CarPlaySceneDelegate</string>
</dict>
</array>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>


#4 Enable CarPlay icon setting

Select [Assets.xcassets] -> [AppIcon] and enable a "CarPlay" checkbox.

#5 Implement CarPlaySceneDelegate

CarPlaySceneDelegate.swift like this
Code Block language
import CarPlay
class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
var interfaceController: CPInterfaceController?
// CarPlay connected
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) {
self.interfaceController = interfaceController
let contact = CPContact(name: "TEST", image: UIImage(named: "Person.jpg")!)
let template = CPContactTemplate(contact: contact)
self.interfaceController?.setRootTemplate(template, animated: false, completion: nil)
}
// CarPlay disconnected
private func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnect interfaceController: CPInterfaceController) {
self.interfaceController = nil
}
}

And add any Person.jpg file to your project.

#6 Add an Intents App Extension to your project

Choose Xcode [File] > [New] > [Target...] and select "Intents Extension".
Product Name: myintentextension
Language: Swift
Stating Point: Messaging (Default)

If you create above "Intents Extension", "Activate scheme" dialog shows.
Select Activate.

And then, set iOS version to "TARGETS".
In my case, my iPhone device version is iOS 14.0, so I set it as follows.

TARGETS :
mytestapp : iOS 14.0
myintentextension : iOS 14.0
myintentextensionUI : iOS 14.0

"myintentextension" and "myintentextensionUI" directories and source code are generated automatically.

Currently, my Xcode project uses intents that are generated automatically.
(In the future, I will implement intents what I want to do.)

#7 Build and install app.

Build and install your app to the simulator or iPhone real device and run it.
If you would like to run on the iPhone real device,
you create a provisioning profile includes CarPlay communication entitlement.
And import it to your project.
In my case, I imported a provisioning profile and set manually.

My environment

Xcode version : 12.1
iOS version : 14.0
I tried it according to your instructions.

If I add these INSearchForMessagesIntent and INSendMessageIntent values to the plist,
the application will appear on the real device.

I don't want my app to support Siri text messaging.

I implement only INStartCallIntent.
I don't want my app to support Siri text messaging.

I read CarPlay document again.
In case of "calling", I think we must implement the following intents.
I will try this next week.


https://developer.apple.com/design/human-interface-guidelines/carplay/overview/messaging-and-voip-apps/
Enable the appropriate Siri functions if your app supports VoIP.
To work with CarPlay, a VoIP app must allow the user to search the call history and start audio calls using Siri.
For developer guidance, see INSearchCallHistoryIntentIdentifier, and INStartAudioCallIntentIdentifier.


https://developer.apple.com/documentation/sirikit/instartaudiocallintent
https://developer.apple.com/documentation/sirikit/instartaudiocallintentidentifier
https://developer.apple.com/documentation/sirikit/insearchcallhistoryintent
https://developer.apple.com/documentation/sirikit/insearchcallhistoryintentidentifier

Accepted Answer

In case of "calling", I think we must implement the following intents.
https://developer.apple.com/documentation/sirikit/instartaudiocallintent
https://developer.apple.com/documentation/sirikit/insearchcallhistoryintent

I added "INStartAudioCallIntent" and "INSearchCallHistoryIntent" to the info.plist.
My communication app appears on the CarPlay screen of the real device and the Simulator.

I think that our problem was solved.

I changed #6 step and tried.

#6 Add an Intents App Extension to your project

Choose Xcode [File] > [New] > [Target...] and select "Intents Extension".
Product Name: myintentextension
Language: Swift
Starting Point: None <-- changed


I changed "Starting Point" value to "None".
And I added "INStartAudioCallIntent" and "INSearchCallHistoryIntent" to the info.plist of "myintentextension" manually.

info.plist (Information Property List)
--> NSExtension
--> NSExtensionAttributes
--> IntentsSupported (Add "INStartAudioCallIntent" and "INSearchCallHistoryIntent")

In case of "Messaging",  I think that it need to add "INSearchForMessagesIntent" and "INSendMessageIntent".

I added "INStartAudioCallIntent" and "INSearchCallHistoryIntent" to the info.plist.
My communication app appears on the CarPlay screen of the real device and the Simulator.

I think that our problem was solved.



In CarPlay documentation:
  • VoIP calling must be handled using CallKit and SiriKit. Your app must support starting an audio call, and searching the user’s call history.

Thanks for the tip, I'm going to try it.
Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
 
 
Q