简体   繁体   中英

What type of data store should I use for my ios app?

I am pretty new to ios and using servers so forgive me.

I am building an ios app for research. I need to monitor things that the user does and then push it up to a server for analysis (yes, with user and IRB permission). On the client's side I need to keep quite a bit of data that won't really change except in the case of pulling an updated version from the server, and then a minimal amount of user-specific data. Most of the data I will collect needs to be pushed to a server for analysis and then can be deleted from the client side.

I am struggling to figure out what kind of data store I need to use, especially since I am not quite sure how the pushing and pulling from the server process works yet. Does it make sense to use Core Data? XML? SQLite? I like the Core Data idea, but I am not sure what kind of problems I will run into when I need to send large amounts of data to it and from it from the server. I imagine I might need to send data in a different form than it is probably stored in on either end - so what kind of overhead am I likely to run into in the process of converting that data? Is there a good format to save stuff in that would work well for me on both ends AND for sending the data?

As you can probably tell, I could use some advice. Thanks!

Core Data is probably the way to go.

Either Core Data or SQLite is likely to be great for this sort of app. Core Data actually uses SQLite behind the scenes. But Core Data has some advantages over SQLite and really is the preferred iOS database technology.

Regarding your performance concerns, I wouldn't worry about it. Core Data (or SQLite) is plenty fast enough. The bandwidth to the server will be the gating factor, so you should be fine there.

It sounds like your data structure is likely to be rich enough or large enough that I wouldn't contemplate other approaches (plists, NSUserDefaults , other file formats, etc.).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM