Does anyone know how it is possible in Swift to read the contents of a text file into an array? I'm having problems with the data type conversion here and so far I can't find a way to save a file that consists of double values into an array. In addition, the values are only separated by line breaks. So a field of an array would have to be a single row. How can I write an automated query that can read a complete text file?
The dataset in the text file looks like this:
- 0.123123
- 0.123232
- 0.344564
- -0.123213 ... and so on