4

When you have the iOS device locked and connect it to the CarPlay head unit via, USB, the device remains locked. Then, on the CarPlay screen on the head unit, you select the app. When the device starts, didFinishLaunchingWithOptions is called from the app delegate, and also applicationDidEnterBackground. But, applicationWillEnterForeground is not called. The app doesn't enter the foreground. At this point, when the app attempts to make network calls, no network requests are sent. The app remains in the background until device is unlocked.

Can anyone tell me what the lifecycle is for CarPlay audio app? I have not found this documented anywhere yet. I'm not sure that background fetch is the way to go, since that is for limited time to complete tasks before shutting down the app. Is there somehing that I'm missing in the lifecycle? I've seen that this scenario works in other audio CarPlay apps.

thibault
  • 41
  • 1

1 Answers1

0

CarPlay Audio apps are always launched in the background, hence you need to make sure to enable the audio playback background mode.

DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67
  • is it possible to change color of the back (Navigation) button in CarPlay now playing screen? – Divyesh Oct 03 '20 at 07:46
  • Unfortunately not. – DrMickeyLauer Oct 03 '20 at 17:48
  • ok, I have used RmoteCommandCenter to handle playback buttons and I have enable play, pause options and also set target for each but every time when I click button it always calls play button target method and icon of play/pause also not change properly, pause button's method not get called, do you have idea regards this?? – Divyesh Oct 05 '20 at 10:14