Text Files For Database

Just a general question that I really should have asked weeks ago. This is the first app I’m developing to sell in the App Store. It its current state, it uses a text file to store and retrieve data which is working well, but will this suffice for second party end users? I’ve tinkered with SQLite in the past and if it’s necessary for the App Store, I can replace my text file method of data management with a SQLite database. But if what I’m doing is feasible, I’d rather just stick with it. Any thoughts?

If your data has any type of structure then I would always prefer a SQLite database. I have a settings database with now 10 tables. Handing that in the plist file I had before was a pain and full of kludges.

2 Likes

it depending how much data you will store.
you must care about data safety, backup, the place of your database storage.
maintainability if you have changes in future.
if data grow daily it should not be a brake.
the target enviroment are single-user or multi-user. using concurrent or not.
for text data use at least a row with interface version number.

i have one planning app that store data daily bound in json.

My iOS app is available for download and is using csv files to load and save data because I wasn’t really into databases when I made the app.

I’ve made myself familiar with SQLite in the meantime and I’m currently working on replacing all these csv files with tables in a database and while it takes some time, it’s soooo much better. For example, the app loads a lot faster or if you need to sort data, the database does it for you. No need to do that in your code any longer.

So if you’re just starting your app, my recommendation is to use a database.

In short, there might be reasons you’d benefit from switching to a database, but Apple’s requirements isn’t among them.

1 Like

Thanks, everyone! As always, I appreciate all the feedback. Since managing data via text files is not a deal breaker with Apple, and my app only uses one table, in the interest of time, I think I’ll finish it up with the text file method so I can get it out the door. At some point in the future, and especially if it proves successful, I’ll do what Christoph is doing and replace the text files with SQLite. Thanks again!

2 Likes

Just though you might like to know that on second thought, you guys convinced me to use the database. :pray: :pray: :pray:

1 Like