How can we obtain a trusted timestamp using iOS and swift?

I’m looking to timestamp a file from within an iOS app using a TSA

The OpenSSL route to do it would be e.g.

openssl ts -query -data myFile.png -no_nonce -out myFile.tsq

How can we do the same using Apple’s PKI equivalents on iOS using Swift?