Ios – Easy way to see saved NSUserDefaults

iosmacosnsuserdefaultsobjective c

Is there a way to see what's been saved to NSUserDefaults directly? I'd like to see if my data saved correctly.

Best Answer

You can print all current NSUserDefaults to the log:

Just keys:

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

Keys and values:

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