SwiftUI AsyncImage does not resume/recover when coming back on screen in a List

Originator:kishyr
Number:rdar://FB9210194 Date Originated:25 June 2021
Status:Open Resolved:
Product:SwiftUI Framework Product Version:Xcode 13/iOS 15 beta 2
Classification:SwiftUI Reproducible:Yes
 
Please describe the issue and what steps we can take to reproduce it:
When using SwiftUI's new AsyncImage component in a List containing more cells than can display on screen, it does not display its image when scrolling to cells that were initially off-screen (each image is unique). Its phase's error immediately returns 'cancelled' without attempting to fetch and display the image. When attempting to scroll back up to cells that were initially rendered, the images in those cells are gone, and those image's phases are also 'cancelled'.

The above behaviour does not happen when using AsyncImage in a VStack or HStack (I presume nothing gets recycled in those views.)

Expected behaviour:
AsyncImage to fetch and display images when scrolling through a list.

Actual behavior:
AsyncImage cancels image requests and does not recover.

Last tested on Xcode 13 beta 2 / iOS 15 beta 2.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!