• 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: Application upgrades itself?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application upgrades itself?


  • Subject: Re: Application upgrades itself?
  • From: Chris Suter <email@hidden>
  • Date: Mon, 24 Jul 2006 12:16:18 +1000

On 24/07/2006, at 11:45 AM, Bobby B wrote:

Hello list!

I've encountered a bit of a logic problem.  I want to put an option in
my .app to make it upgradeable (ie, they have a new copy of my app
downloaded, and the app will make it easy for them to copy it over and
restart itself -- this sounds stupid, but in the context of this app
its almost a necessity)

All the file handling is simple, but I don't understand *how* this can
work.  I would have to copy over the .app that is currently loaded.
May anyone offer a suggestion?  This should be pretty simple, but I
can't seem to figure out this bit of it.

Thank you
BB

We do it in our applications.

We just install the new version in a temporary directory and then when we're ready, rename the existing path to somewhere in the temp directory, rename the new version to the appropriate name and then delete the old one that we renamed earlier.

We then call [NSApp terminate:] and as we're terminating we start a task to relaunch the new version.

- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Application upgrades itself? (From: "Bobby B" <email@hidden>)

  • Prev by Date: Re: Application upgrades itself?
  • Next by Date: Re: writing huge C-array to a file
  • Previous by thread: Re: Application upgrades itself?
  • Next by thread: Re: Application upgrades itself?
  • Index(es):
    • Date
    • Thread