尽管我在互联网上找到了所有方法。但它通过在线翻译工作。
例如,我尝试过的方法:
if let decodedData = NSData(base64Encoded: parts[1] as String, options:NSData.Base64DecodingOptions(rawValue: 0)),
let decodedString = NSString(data: decodedData as Data, encoding: String.Encoding.utf8.rawValue) {
print(decodedString)//Here we are getting decoded string
}