Objective-c – NSUserDefaults: Dumping the structure of NSUserDefaults’s standardUserDefaults

cocoa-touchobjective-c

Does anyone know of a quick way to dump the standardUserDefaults of NSUserDefaults via NSLog? This is what I have:

NSLog(@"NSUserDefaults dump: %@", [NSUserDefaults standardUserDefaults]);

But it returns:

NSUserDefaults dump: <NSUserDefaults: 0x50b520>

…which is not quite what I'm looking for. I'd really like to have key-value pairs.

Any help or a point in the right direction would be greatly appreciated. Cheers!

Best Solution

NSLog(@"NSUserDefaults dump: %@", [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]);