What technology should I use for app data

I am building my first iOS app. I have used core data to save things that the user adds to the app.

My question is, should I want to have a dropdown for example that is dynamically populated, where would this data be stored.

When writing web apps, I would connect to a MySQL database and have tables for application data and tables for data created by the user.

I am just trying to get my head around how to use preexisting data inside the application so I can continue my learning.

My research has suggested SQLite but is this the best place to start or does apple offer a way of storing app data elsewhere?

The answer to this question is a huge “it depends”. Without knowing the particulars of your application’s needs it will be hard to provide a concrete answer.

To answer your question: Yes, you can use SQLite or Core Data, typically the latter makes it easier and there is little performance gains for small amounts of data. Plus you have the ability to sync.

That said…

There are many ways to store and retrieve data for iOS/Swift (such as Core Data, SQLite, Firebase, CouchBase, JSON/resource or retrieved, PLIST/resource or retrieved, shared file/static, etc). Each one has advantages and disadvantages that go beyond the scope of this humble reply.

If you want to populate a drop-down for dynamic fill, please ask yourself if this data changes, how often and how? Depending on that, you may want to use different methods, each one being more efficient for your purpose.

Please note that in a traditional server side model, you have a similar situation, but tend to stick with what you know best (such as MySQL), but other (better?) solutions may be available such as NoSQL (Mongo, Redis, etc) or other SQL (SQLServer, Postgresql, etc). But since the resources are all in one spot, it doesn’t matter as much.

This is not the case with your mobile device, as you may not always be connected to your resource via network, or it may be slow, etc.

The best recommendation anybody can give you is to learn about your options, and pick the best tool for the job.

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.