This is from the documentation:
Transition to the Now Playing screen
When the user selects a playable item such as a radio station or song title to request audio playback, CarPlay should transition to the Now Playing screen as soon as content is available for playback. However, it may take several seconds for audio to actually start playing due to buffering or network conditions. Apple recommends that you let the selected item remain highlighted with an animated spinner to indicate that the content is loading. iOS automatically draws the spinner and it will remain until your app returns the completion handler. However, if your app does not return the completion handler for a long period of time, iOS will eventually timeout and display an error screen.
I try this,
It starts playing, but never transitions to the "Now Playing" screen.
What am I doing wrong?
func playableContentManager(_ contentManager: MPPlayableContentManager, initiatePlaybackOfContentItemAt indexPath: IndexPath, completionHandler: @escaping (Error?) -> Void) {
self.play(mArray[indexPath[0]])
completionHandler(nil)
}