Re: how to deploy the sqlite file in my Cocoa application installation
Re: how to deploy the sqlite file in my Cocoa application installation
- Subject: Re: how to deploy the sqlite file in my Cocoa application installation
- From: email@hidden
- Date: Fri, 16 Jul 2010 08:27:12 -0400
On Jul 16, 2010, at 5:23 AM, Mike Abdullah wrote:
> SQLite is not part of Cocoa, so this is the wrong list. You should either:
>
> 1) Find the SQLite docs/list
> 2) Use Core Data instead
>
> On 16 Jul 2010, at 02:39, Wayne Shao wrote:
>
>> Hi,
>>
>> I am using sqlite in my cocoa application (for regular mac desktop/laptop).
>>
>> 1. How do I initialize the sqlite (e.g, make sure empty tables with the
>> correct schema is put at the right path)
>> as part of the application installation?
>> 2. Any documentation on the install/packaging of my application in general?
>>
>> Thanks,
>> --
>> W. Shao
I would think the process of shipping a data file with an app is a fair question for this list. What I do (and I think is recommended) in my iPhone app is to take your default sqlite file (with the tables created) and add it as a resource to your project in Xcode. I take this a slight step farther and have the sql commands be issued as part of a build script to create the file (that way I can easily modify it later if necessary). Then when your app launches, you check for the existence of the data file in the location your app would put it (such as a folder in the users's ~/Library/Application Support/YourAppName) and if it's not there, copy it from your application's resources to that directory.
HTH,
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden