I’m working on CarPlay for audio app. this is my code
if tabIndex == 0
{
let item = MPContentItem(identifier: "Tab \(tabIndex) Item")
item.title = Myarray[indexPath.row].name
item.subtitle = Myarray[indexPath.row].desc
item.artwork = MPMediaItemArtwork(image: imageLiteral(resourceName: Myarray[indexPath.row].imageURL))
item.isPlayable = true
if #available(iOS 10.0, *)
{
item.isStreamingContent = true
}
return item
}
So, the problem is this, when I load CarPlay I have 4 items with the same name/description/image. It should be 4 items with the different name, description and image. In my case all is the same. 1 item four time. The item is random. But when I click on it goes to the NowPlaying screen and it is the right item. Labels are correct and also the picture is correct. How can I fix this, please help.
Thanks
P.S. I also tested or real device