I'm now developing an iOS app using xcode(Swift). I'd like to import the data which is stored in a csv file, but I'm not sure where to import the data. (I just want the words from the csv file can be represented on the screen.) Should I create a core data file? How can I import an existing csv file into the project?
Asked
Active
Viewed 2,337 times
1 Answers
0
You can find several resources on Github for importing CSV files, like this one. You'll probably want to use them with CocoaPods.
Where to store the data in a CSV file really depends on what you want to use it for. If you want to allow your users to import data that they might want to persist and manage, you'll want to set up a CoreData of SQLite database.
However, if just displaying data on the screen is all you need, this won't be necessary and you can just use Dictionaries
or Arrays
to work with the data you get from the CSV File. Keep in mind, though, that this would require you to import the CSV file every time you launch the app.

Joris416
- 4,751
- 5
- 32
- 59