SwiftUI PhotosPicker: First selected image stays in loading state

1 day ago 4
ARTICLE AD BOX

I’m implementing an inline PhotosPicker using Apple’s sample from the documentation:

https://developer.apple.com/documentation/photokit/implementing-an-inline-photos-picker

I’m using their ViewModel-based approach (async loading via loadTransferable), but I’m encountering a strange issue:

The first selected image always stays in a loading state, even though subsequent selections work correctly.

This is not caused by LazyHStack/LazyVGrid, as I initially suspected. Here’s a video describing the problem: https://streamable.com/4v2utl

Read Entire Article