Hi. there are a bug when executing your sample proejct on xcode.
The app have crashed in cellForRow method of tableView.
Especially ‘guard let cgImage = context.createCGImage(output, from: fromRect)’
The error messages are following.
MTLDebugValidateMTLPixelFormat, line 1434: error ‘pixelFormat (11) is not a valid MTLPixelFormat.’
MTLDebugValidateMTLPixelFormat:1434: failed assertion `pixelFormat (11) is not a valid MTLPixelFormat.’
thanks.