A few weeks ago, I asked how to Fill an array with strings from a txt file.
A few answers (that worked) had been given, but since I updated Xcode 6 to Beta 3, they don't work anymore.
The code is this one:
let bundle = NSBundle.mainBundle()
let path = bundle.pathForResource("data", ofType: "txt")
let dico = NSString(contentsOfFile: path).componentsSeparatedByString("\n")
Since Beta 3, the following error is being displayed about NSString
:
'init(contentsOfFile:)' is unavailable: APIs deprecated of iOS7 and earlier are unavailable in Swift