swift + data to string

Swift
let str = String(decoding: data, as: UTF8.self)
Source

Also in Swift: