Launching iPhone app when CarPlay app opened

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.

Answered by Frameworks Engineer in 782393022

CarPlay apps are expected to function when launched only on the car display, in which case the phone won't receive a scene/window and the AppDelegate won't be available.

Can you share more about what your AppDelegate is doing? Can that functionality be refactored somewhere that would not require the phone app to launch? Thanks!

CarPlay apps are expected to function when launched only on the car display, in which case the phone won't receive a scene/window and the AppDelegate won't be available.

Can you share more about what your AppDelegate is doing? Can that functionality be refactored somewhere that would not require the phone app to launch? Thanks!

The AppDelegate holds a weak reference to a UIViewController, which is assigned when the VC is initialised. I'd like to be able to access an instance of this class from CarPlay, without the iPhone app. I tried manually initialising the VC within the CarPlay app, but that did not solve the issue.

Based on the information you've provided, a shared data source that both scenes can access would be better than relying on a view from iOS for information needed for CarPlay.

Launching iPhone app when CarPlay app opened
 
 
Q