https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html says it is
...shou
Speaking for 10.10 and iOS8 if you looking into the implementation you'll find that -[NSUserDefaults setObject:forKey:]
is calling __CFPreferencesSetAppValueWithContainer
, which will eventually end up in +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:]
. This method is using a pthread_mutex_t
to lock the access to the dictionary containing the values.
So NSUserDefaults is thread safe.
The Apple iOS 5.1 and OS X 10.7 documentation say that it is thread-safe; therefore it is thread-safe.