Post

Replies

Boosts

Views

Activity

Reply to Launch a CarPlay app scene from another CarPlay app using URL Scheme.
I think that you can solve it by referring to the following thread. You can launch another carplay app by using CPTemplateApplicationScene. https://developer.apple.com/forums/thread/128945 My situation, I implement the following in CarPlaySceneDelegate. I can launch another CarPlay app using URL scheme like this. Example code (Launch iOS map or google map in CarPlay): import CarPlay class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { &#9;&#9;... &#9;&#9;var cpTemplateApplicationScene : CPTemplateApplicationScene? &#9;&#9; &#9;&#9;... &#9;&#9; &#9;&#9;// CarPlay connected &#9;&#9;func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) { &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;self.cpTemplateApplicationScene = templateApplicationScene &#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;// Call the following by some kind of trigger. &#9;&#9;&#9;&#9;self.launchmap(<desination latitude>, <desination longtitude>, carplay: true) &#9;&#9;&#9;&#9;... &#9;&#9;} &#9;&#9;// Lanch map app function &#9;&#9;func launchmap(latitude: String, longtitude: String, carplay : Bool = true) { &#9;&#9;&#9;&#9;let urlString: String! &#9;&#9;&#9;&#9;if UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!) { &#9;&#9;&#9;&#9;&#9;&#9;urlString = "comgooglemaps://?&daddr=\(latitude),\(longtitude)&directionsmode=driving" &#9;&#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;&#9;&#9;urlString = "http://maps.apple.com/?daddr=\(latitude),\(longtitude)&dirflg=d" &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;if let url = URL(string: urlString) { &#9;&#9;&#9;&#9;&#9;&#9;if (carplay) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;self.cpTemplateApplicationScene?.open(url, options: nil, completionHandler: { (Void) in print("completed!")}) &#9;&#9;&#9;&#9;&#9;&#9;} else { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;UIApplication.shared.open(url) &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} &#9;&#9;} &#9;&#9;... }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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) &#92;&#45;-> NSExtension &#92;&#45;-> NSExtensionAttributes &#92;&#45;-> IntentsSupported (Add "INStartAudioCallIntent" and "INSearchCallHistoryIntent") In case of "Messaging",  I think that it need to add "INSearchForMessagesIntent" and "INSendMessageIntent".
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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 <?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. <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 import CarPlay class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { &#9;&#9;var interfaceController: CPInterfaceController? &#9;&#9;// CarPlay connected &#9;&#9;func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) { &#9;&#9;&#9;&#9;self.interfaceController = interfaceController &#9;&#9;&#9;&#9;let contact = CPContact(name: "TEST", image: UIImage(named: "Person.jpg")!) &#9;&#9;&#9;&#9;let template = CPContactTemplate(contact: contact) &#9;&#9;&#9;&#9;self.interfaceController?.setRootTemplate(template, animated: false, completion: nil) &#9;&#9;} &#9;&#9;// CarPlay disconnected &#9;&#9;private func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnect interfaceController: CPInterfaceController) { &#9;&#9;&#9;&#9;self.interfaceController = nil &#9;&#9;} } 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
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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.
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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.
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay 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
Topic: App & System Services SubTopic: General Tags:
Nov ’20
Reply to Can I launch a CarPlay Communication app on the XCode CarPlay simulator?
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.
Topic: App & System Services SubTopic: General Tags:
Oct ’20