Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See NSUserDefaults file content

Is there any way I can see the content of NSUserDefaults? I'm able to open the plist file using "pico" from the terminal, but it shows weird characters, I can't actually see the content file content. Is there any way I can open the file in Xcode?

Basically, I want to be able to see and edit the content of NSUserDefaults without the need of doing so programmatically, I'd like to do so from the Terminal or from Xcode. Cheers!

like image 317
Rafael Avatar asked Apr 26 '26 14:04

Rafael


1 Answers

I'm able to open the file using "pico" but it shows weird characters.

Because as an optimization (storage space and read/write speed) iOS stores property list files in the binary format. You need to convert it to XML format using

plutil -convert xml1 com.yourapp.bundleid.plist

After this, you'll be able to see a meaningful result when opened in a text editor (such as Pico).