Re: cleanly support drag-to-trash for uninstall?
Re: cleanly support drag-to-trash for uninstall?
- Subject: Re: cleanly support drag-to-trash for uninstall?
- From: Jens Alfke <email@hidden>
- Date: Fri, 05 Aug 2011 22:07:48 -0700
On Aug 5, 2011, at 8:04 AM, Carl Harris wrote:
> I have a Cocoa app that (among other things) installs an agent in launchd that runs in the background. The agent installation happens when the app is first launched after install.
> I'd like to support the drag-to-trash approach to uninstalling. Can my background agent listen for some notification that would allow me to detect that the app bundle has been dragged to the trash, so I can clean up properly?
Interesting question. I’m not aware of any such notification.
The best thing I can think of is to have your agent process periodically check whether its file still exists, and exit if it doesn’t (or if it’s now inside the trash).
—Jens_______________________________________________
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