Set video poster frame programmatically (on iOS)

As per the title, but let me provide some more context: on macos, using the Photos app, I can change the ‘poster frame, for a video. This frame is the one displayed as a thumbnail. on iOS’ Photos app this functionality does not (see to?) exist. So, to solve my own problem, I would like to build an app that does just that.

I am not sure how ‘poster frame’ is implemented, and have no idea where to start looking (perusing the PhotoKit and AVAssetWriter documentation, I didn’t find any hints on ‘poster frame’.

I am just looking for some pointers at this point, to understand if this is at all possible.