Re: Deleting preference file from within the application

2008-04-28 Thread Andrew BusH
Hi all, thanks for the quick response. funny, I thought I had tried that and that it had failed, leading me to assume that removePersistentDomainforName was intended for something else (its not like the docs are particularly specific on what it does) but doing it again it seems to work perf

Re: Deleting preference file from within the application

2008-04-28 Thread Andy Lee
This would be better than hard-coding the bundle identifier... [[NSUserDefaults standardUserDefaults] removePersistentDomainForName: [[NSBundle mainBundle] bundleIdentifier]]; --Andy On Apr 29, 2008, at 2:18 AM, Andy Lee wrote: If you call this, the prefs file will b

Re: Deleting preference file from within the application

2008-04-28 Thread Andy Lee
If you call this, the prefs file will be deleted for you, and will stay deleted: [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:@"bundle.identifier.for.your.app"]; I tested this by calling it in -applicationWillTerminate:. I assume you could call it so

Re: Deleting preference file from within the application

2008-04-28 Thread Kyle Sluder
On Tue, Apr 29, 2008 at 12:22 AM, Andrew BusH <[EMAIL PROTECTED]> wrote: > is there anyway to stop the application from doing this? Ive looked > through NSUserDefaults but there is nothing there that looks up to the job. I'd write a simple shell tool that deletes the preferences. Register a fun

Deleting preference file from within the application

2008-04-28 Thread Andrew BusH
Hi all, I am attempting to add an 'Uninstall' option to an application, to do this I remove all the support files and then finally delete the preferences file and terminate the application. unfortunately (albeit unsurprisingly) the last thing the application does before it quits is write