This is the implemented code needed:
var dataString = String(data: fooData, encoding: String.Encoding.utf8)
or just
var dataString = String(data: fooData, encoding: .utf8)
Older swift version:
in Swift 2.0:
import Foundation
var dataString = String(data: fooData, encoding: NSUTF8StringEncoding)
in Swift 1.0:
var dataString = NSString(data: fooData, encoding:NSUTF8StringEncoding)