tags:

views:

20

answers:

1

I have bunch of preference values registered via [NSUserDefaults registerDefaults:] call on application startup. I need to replace them at some stage with new ones but new values scope (keys set) is less than initial one. So after I call [NSUserDefaults registerDefaults:] again I have new values with some old that weren't replaced. Is there a possibility to remove previously registered values?

A: 

You can use removeVolatileDomainForName: to remove the NSRegistrationDomain. This clears all values registered via registerDefaults:. But if you need to do this you’re most likely doing something wrong. The right way would be to actually store the new settings using one of the set...:forKey: methods.

Sven
This solution won't fix my issue due to removeVolatileDomainForName works in level+1 stage than defaults
macwasik