Can I set images async in a CPListTemplate in CarPlay?

Hi all!

I'm working on adding CarPlay integration to a music player app and have a question about loading images in the SDK...

I have a CPListTemplate screen displaying albums, and this screen potentially needs to display hundreds of items in a single section for some users.

I'm not having any trouble populating the text content of these items, but the associated images may need fetched asynchronously. I looked into calling listItem.setImage(...) on my list items and template.updateSections(...) with updated content once it is loaded, but in both of these cases the scroll position in my Simulator is interrupted and pushed to the top, causing a bad user experience.

Is there a better way to go about updating content live? Or must I prefetch the needed images and only push the template when all data is ready for display?

As a note I've additionally noticed lag building a list of around ~100 items when I set a simple placeholder image at list item creation time. Has anyone else experienced this? Hoping this is just the Simulator - will have a head unit to test next week!

Edit: also, any chance that WWDC 2021 will have a labs session for the CarPlay SDK? :)

Thanks!

-Colin

You should only need to use -[CPListTemplate updateSections:] if you are adding, removing, or reordering list items in your list template. If instead you are updating existing list items, for example to change the list item image, then -[CPListItem setImage:] should be all you need, and the system should automatically reload the affected rows in your list template to display your new image.

Please make sure you're trying out the latest iOS 14 SDK (or iOS 15 Beta), as a number of performance improvements have been made here!

Can I set images async in a CPListTemplate in CarPlay?
 
 
Q