Check out example codes for "swift convert base64 string to data". It will help you in understanding the concepts better.

Code Example 1

var data = Data(base64Encoded: recording_base64, options: .ignoreUnknownCharacters)

Learn ReactJs, React Native from akashmittal.com