'How To decode Base64 encoded .SVG string using Swift 5.x

I want to decode a base64 encoded .svg image using Swift 5.x. Can anybody guide me on how to do it?

I have encoded and decoded base64 .png before. Need help about .svg specifically.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source