Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-20-2010, 07:19 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 37
srpblitz is on a distinguished road
Default question about sqlite DB

if i create a database and build an app around it and then when uploading the finished app are you allowed to include this database as a separate file that gets installed say on the iphone along with the app itself. Trying to make sure my design concept is doable. The standalone database would then sit on the iphone as persistent storage whenever app is started and could grow to the theretical limits of disk storage available on phone. Am i correct in this concept? Then if i submit update for app how do i keep from overlaying database?
srpblitz is offline   Reply With Quote
Old 10-21-2010, 06:41 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

Quote:
Originally Posted by srpblitz View Post
if i create a database and build an app around it and then when uploading the finished app are you allowed to include this database as a separate file that gets installed say on the iphone along with the app itself. Trying to make sure my design concept is doable. The standalone database would then sit on the iphone as persistent storage whenever app is started and could grow to the theretical limits of disk storage available on phone. Am i correct in this concept? Then if i submit update for app how do i keep from overlaying database?
You can include your db inside the App`s bundle, for a read-only database. You may copy it to your application`s Documents directory once installed, and change the data as you wish there. When updating your app you should verify if there is any data previously available and keep it.
nobre84 is offline   Reply With Quote
Old 10-21-2010, 07:07 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 37
srpblitz is on a distinguished road
Default

Quote:
Originally Posted by nobre84 View Post
You can include your db inside the App`s bundle, for a read-only database. You may copy it to your application`s Documents directory once installed, and change the data as you wish there. When updating your app you should verify if there is any data previously available and keep it.
Thanks for the reply. I wanted the db to be updatable by app when installed on iphone so im curious about why you say read only. Also, by having db that user saves data into does that mean the app is now responsible for db maintenance like for when space runs out? Liability implications? Not sure i want to add a maintenance nightmare.
srpblitz is offline   Reply With Quote
Old 10-21-2010, 10:45 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

I mean, the database you ship inside your bundle (the .APP directory) cannot be written. You must make a copy to a writeable directory on your application sandbox (/Documents). So, in fact when you update the app, only the Bundle will replace the older one, the previous work database is in the Documents directory. You need then to compare them and act appropriately
nobre84 is offline   Reply With Quote
Old 10-21-2010, 11:29 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 37
srpblitz is on a distinguished road
Default

Okay, I think i'm following, I just don't know the semantics of file creation on these devices. I want to create a database where the user can save data while using app but I don't want to wipe out that database during app updates but I do want the user to be responsible for their own database and data after initial creation. I simply provide option to add/update/delete.
srpblitz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
8 members and 322 guests
condor304, Desert Diva, dre, hain, mottdog, oceanlablight, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0