Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Congratulations. If you don't mind me asking, what do you use for data storage in iOS? In other words do you use Core Data, SQLite, or something else?


Most of the apps I write use transient data loaded from a server, so I download and cache the JSON from my server locally and build the tables, etc. that way.

I haven't delved into CoreData just yet. It looks daunting, and I've only been doing this for a year, but it's next on my list to learn.

Check out my github account for some of my iOS stuff. (my username on hn = my username on github)


Thanks, but I am a little lost. I take your answer to mean the Checkout Helper app uses JSON to read from a database for the column of prices and discounts, but how is it cached locally?

I am just wondering how to do something similar in an app I have built, calculates a column of numbers, but in a different knowledge domain from your app.


Ahh, that app doesn't actually use any web services other than for the in-app purchasing.

The numbers that are calculated are from direct user input, but the things that are stored like shipping and tax rates are stored using NSUserDefaults.

Caching data locally is fairly easy... just put the downloaded JSON file into the application's sandboxed /Documents folder for easy retrieval later.


Ah-ha! I just assumed the "Your Items" list was saved, but it obviously isn't. I write my apps to saved the input lists. My assumption is that the user wants to preserve the list items for future usage. Maybe it is more than needs to be done.


I am in fact saving the list so the user can have history of what was entered and then they can name the transaction, duplicate and restore transactions. I'm just using JSON to save the history. I tested up to 100k records and didn't see a slow-down in performance so to deter me from doing it that way.

Best possible solution in a perfect world? No. Works? yes. Works well? Yes.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: