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 perfectly.

thanks again :)


- Andrew


On Apr 29, 2008, at 6:23 PM, Andy Lee wrote:

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 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 sooner.

To see your app's bundle identifier, go to Targets -> YourApplication -> Get Info (Command-I) -> Properties -> Identifier. (I mention this because I forgot where it was specified myself and had to dig around.)

--Andy


On Apr 29, 2008, at 12:22 AM, Andrew BusH wrote:

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 out the preferences, thereby recreating the preferences file.

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.

does anyone have any ideas?


thanks for any help.


- Andrew

_______________________________________________

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/aglee%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

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/aglee%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

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/andrew.bush%40xtra.co.nz

This email sent to [EMAIL PROTECTED]

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to