I have an array of tuples (String, String, String) that I want to write to a text file. I've tried different methods such as:
let mySwiftArray = ... // Your Swift array
let cocoaArray : NSArray = mySwiftArray
cocoaArray.writeToFile(filePath, atomically:true)
But this gives me an error:
Cannot convert value of type '[(String, String, String)]' to specified type 'NSArray'
What can I do to write my array to a file?
I've uploaded my project to GitHub for those who would like to download it.
listOfTasks : [(String,String,String)] = []And I fill that up with multiple tuples..0,.1, etc. EDIT: NVM, I used listOfTasks[0][0] for example.