I am new to iphone development. I am currently doing a restaurant app which takes data from a database. How can we store the data in a DB on iphone through our app so that it would even work offline?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use SQLite. Since the database is just a file, you can add the 50 MB file to your application, and that’s it. SQLite’s performance on the iPhone is good, in my experience, although YMMV depending on your exact table layout and indexes.
Just remember to keep a keen eye on how much data you fill it with:
Although 50 MB is way below the limit, be aware that a 50 MB application will take some time to download for people, and people cannot install it from the AppStore without either a WiFi connection or iTunes.
Also, applications that “grow” in size too rapidly after you install them can become unpopular on the smaller devices.
Here is a tutorial