ActualCodeSome plist files are generated during development. But how can I check whether these plist files are successfully generated and the generated content is correct during debugging?
How can I view the logs generated by the simulator and those generated by the real machine?
Demo
Generate a plist file first
Nsarray * paths = nssearchpathfordirectoriesindomains (nsdocumentdirectory, nsuserdomainmask, yes );
Nsstring * documentsdirectroy = [paths objectatindex: 0];
Nsstring * filename = @ "1. plist ";
Nsstring * filepath = [tmpfolder stringbyappendingpathcomponent: Filename];
Nsmutabledictionary * DIC = [[nsmutabledictionary alloc] init];
[DIC setvalue: @ "11111" forkey: @ "1"];
[DIC writetofile: filepath atomically: True];
View simulator logs
Okay. Now you need to debug it on the simulator.Program:
Run the simulator;
Open Finder, press and hold option, and select "go"-"resource library" in the menu bar"
Select the first "Application Support"-"iPhone Simulator"-"5.0" (if the version generated by the simulator is 5.0, if the version is not selected)
-"" Application "-> at this time, a bunch of directories with similar guids will be found one by one, and a directory with the project name is found.
-"Go to the" documents "directory, and you can see the newly created plist file. Open it and check whether the content is correct.
View real machine logs
Select to debug to the real machine (I will not accept the certificate-related configuration, there are many online)
Run the real machine program to generate logs
You need to use a tool to view the log "iPhone Explorer" for real machine logs. Open "iPhone Explorer" and find the project name directory under the "application" directory,
Open "documents" and you will be able to see the newly created plist file. However, if you cannot open the file at this time and drag the file to the desktop, you can view it.