Archive steps:
1. Archive a Nsdictionary object to a list of plist attributes
<1> first to encapsulate the data into a dictionary:
Nsmutabledictionary * Dict = [nsmutabledctionary dictionary];
[Dict setobject:@ "soot" forkey:@ "name"];
[Dict setobject:@ "1234567" forkey:@ "PhoneNumber"];
[Dict setobject:@ "forkey:@" "Age"];
<2> keep the dictionary permanently in the file
[Dict Writetofile:path Atomically:yes]; (Path is the file to which the data is to be written, for example:/users/apple/library/application support/iphone simulator/6.0/applications/documents/ Stu.plist)
2. Read the attribute list
To restore the Nsdictionary object when reading the property list
Nsdictionary * dict = [nsdictionary Dictionarywithcontentsoffile:path];
NSLog (@ "name:%@", [dict objectforkey:@ "name"]);
NSLog (@ "phonenumber:%@", [dict objectforkey:@ "PhoneNumber"]);
NSLog (@ "age:%@", [Dict objectforkey:@ "Age"]);
The flowchart is as follows: