Preserve your images' transparency when saving and sharing them, in Swift

Let's say we are making an app. A chat app, a social media where the main medium are pictures, an image generation app using the latest GAN models machine learning has to offer, whatever. It's an iOS app, written in Swift, it shows images, and users can save those locally and re-share them through other apps, without losing the alpha (the transparency).