The Info.plist file is actually similar to a system configuration file, where you can set the system system language, the program version and whether the state is hidden from reality and so on. We generally open the info.plist is viewed in the form of a property list, of course you can also right-click on the file Select Open As>>>source code opened in XML form.
(1) How to add and delete a Info.plist project?
Where you want to add, right click on >>>add row, you can drop down to view the selection or enter the name directly, then enter the variable later.
To delete, select a bar, have + and-, click the minus sign-you can.
(2) How do I call the value in Info.plist in the code?
In the following function of the APPDELEGATE.M file, enter:
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchOptions { Nsdictionary *dic1=[[nsbundle mainbundle]infodictionary]; NSLog (@ "%@", [Dic1 objectforkey:@ "cfbundleversion"]); Override point for customization after application launch. return YES;}
Where this info.plist file is a dictionary, we need to create a dictionary to accept the data and then use the key value key to get the value.
In this case, the version information (cfbundleversion) was obtained and the result was 1.0.
"iOS Dev-2" info.plist file: How to add and subtract configurations and how to call values inside the code