0

I developed the audio streaming app that supports Apple CarPlay.

It is working proper if iPhone is locked, App is in background or in Active state. But I want to play audio from CarPlay even if App is in terminated state similar to spotify app does.

I tried many things but not able to achieve this. So help me with this and share some code to review.

Thanks.

KAR
  • 3,303
  • 3
  • 27
  • 50
  • Why do you believe that Spotify plays audio from a terminated state? How specifically are you testing this? – Rob Napier Mar 03 '22 at 19:59
  • My phone has installed spotify app and it shows in carplay. So without opening the spotify app I can play music from carplay. @RobNapier – KAR Mar 04 '22 at 07:42
  • Is your app icon not visible on the CarPlay home screen (highly doubt that). What happens if you tap on your app icon in CarPlay when your app is terminated on the phone? – fruitcoder Mar 04 '22 at 11:21
  • @fruitcoder My app icon shows in the carplay and when I open it, it shows play buttons but nothing happens on click of it when app is terminated. – KAR Mar 04 '22 at 11:37
  • Have you implemented any alternative form of navigation to browse your audio content on CarPlay (via the CarPlay framework or the MediaPlayer framework)? – fruitcoder Mar 04 '22 at 12:00
  • @fruitcoder Tried with MediaPlayer framework as I don't know much about CarPlay Framework how to navigation to access data. – KAR Mar 04 '22 at 12:41
  • 2
    @KAR I would really recommend using the CarPlay framework since it seems the MediaPlayer implementations have bugs on new iOS versions. Regardless, you should try to build a boiled-down version of your apps hierarchy to start playback from your CarPlay app alone. Otherwise, you can only control the now playing center/template which won't work if your app isn't already running in the background on iOS. What kind of audio content does your app offer? – fruitcoder Mar 04 '22 at 13:13

0 Answers0