Thanks! That is very helpful. I have added a data file in my project as you suggested.
I come from the linux world, where this sort of things are done in installation script or package post-install script. I have never released an App on Mac. Is there any concept of App post install script? I just found a link through google. http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Introduction/Introduction.html. I will read it. Please let me know if there are other simple samples/docs on this. Thanks, -W. Shao On Fri, Jul 16, 2010 at 5:27 AM, <davel...@mac.com> wrote: > > 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 how can I add things to the build script in XCode? > 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com