• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to deploy the sqlite file in my Cocoa application installation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Wayne Shao <email@hidden>
  • Date: Fri, 16 Jul 2010 21:32:43 -0700

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, <email@hidden> 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 (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

  • Follow-Ups:
    • Re: how to deploy the sqlite file in my Cocoa application installation
      • From: David Reed <email@hidden>
References: 
 >how to deploy the sqlite file in my Cocoa application installation (From: Wayne Shao <email@hidden>)
 >Re: how to deploy the sqlite file in my Cocoa application installation (From: Mike Abdullah <email@hidden>)
 >Re: how to deploy the sqlite file in my Cocoa application installation (From: email@hidden)

  • Prev by Date: Re: Where did the icon come from?
  • Next by Date: How do I refresh NSTableView after programmatically changing bindings on a dataCell
  • Previous by thread: Re: how to deploy the sqlite file in my Cocoa application installation
  • Next by thread: Re: how to deploy the sqlite file in my Cocoa application installation
  • Index(es):
    • Date
    • Thread