Instance Method


Creates a user defaults object initialized with the defaults for the specified user account.


- (id)initWithUser:(NSString *)username;



The name of the user account.

Return Value

An initialized NSUserDefaults object whose argument and registration domains are already set up. If the current user does not have access to the specified user account, this method returns nil.


This method doesn't put anything in the search list. Invoke it only if you’ve allocated your own NSUserDefaults instance instead of using the shared one.

You do not normally use this method to initialize an instance of NSUserDefaults. Applications used by a superuser might use this method to update the defaults databases for a number of users. The user who started the application must have appropriate access (read, write, or both) to the defaults database of the new user, or this method returns nil.

Special Considerations

This method was never implemented to do anything except return the defaults for the current user.

See Also


- synchronize

Waits for any pending asynchronous updates to the defaults database and returns; this method is unnecessary and shouldn't be used.

+ resetStandardUserDefaults

This method has no effect and shouldn't be used.

Language-Dependent Information Constants

These constants are deprecated and shouldn't be used.