Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Sunday, 27 June 2021

What is Infoplist?

 In my application, I am using a plist. Please, can anyone explain what are the uses of plist with an example or a sample code?

  • i met a situation where i need to add data into a plist. but i was not sure what is the use of a plist. so that is the reason why i posted a question. Please help me out if u know the answer – Pradeep Reddy Kypa Nov 18 '09 at 15:27
  • If you want example code of how to store and retrieve data from a plist, follow the link in my answer: developer.apple.com/iphone/library/documentation/iPhone/… – Ben S Nov 18 '09 at 16:20
  • To provide a better experience for users, iOS and OS X rely on the presence of special meta information in each app or bundle. This meta information is used in many different ways. Some of it is displayed to the user, some of it is used internally by the system to identify your app and the document types it supports, and some of it is used by the system frameworks to facilitate the launch of apps. The way an app provides its meta information to the system is through the use of a special file called an information property list file. – Abdul Yasin Aug 8 '13 at 8:41
39

In the context of iPhone development, Property Lists are a key-value store that your application can use to save and retrieve persistent data.

All iPhone applications have at least one of these by default, the Information Property List:

The information property list is a file named Info.plist that is included with every iPhone application project created by Xcode. It is a property list whose key-value pairs specify essential runtime-configuration information for the application. The elements of the information property list are organized in a hierarchy in which each node is an entity such as an array, dictionary, string, or other scalar type.

  • 2
    complete answer addressing the iPhone specific info.plist +1 – Till Nov 18 '09 at 15:27
  • Doesn't have to be a key-value store. Can also be only a value-store or a mix of them. – user142019 Jun 12 '11 at 17:40
  • 1
    To provide a better experience for users, iOS and OS X rely on the presence of special meta information in each app or bundle. This meta information is used in many different ways. Some of it is displayed to the user, some of it is used internally by the system to identify your app and the document types it supports, and some of it is used by the system frameworks to facilitate the launch of apps. The way an app provides its meta information to the system is through the use of a special file called an information property list file. – Abdul Yasin Aug 8 '13 at 8:40
10

Plist are XML files in a specific format. Prior to XML, they had a custom format now called 'old plist'. (You almost never see that anymore save in legacy code.)

Foundations collection classes automatically generate XML files in the plist format when you use their serialization methods to write them to disk. They also automatically read them back. You can also write your own serializers for your own custom objects. This allows you to persistently store complex objects in a robust, human readable format.

One use for plist for programmers is that it is easier to use the plist editor to input and manage a lot of data than it is to try and code it. For example, if you have an class that requires setting a large number of ivars, you can create a plist, read it into an NSArray or NSDictionary and then initialize the instance by passing it the dictionary.

I use this technique when I have to use a large number of paths to draw complex objects. You define the path in the plist file instead of the code and edit the path in the plist editor.

It's also a handy way to create a large amount of detailed test data.

  • And also handy when you have arrays of items which have to be localized. I do this in an app I'm currently working on. – user142019 Jun 12 '11 at 17:39
3

PList means PropertyList It is XML file format It is mainly user for store and reterve the data It can store the key-value pair

2

It's been a long time since I've looked at them, but plist is a short-form of "properties list" and can be used to store application configuration settings that need to persist between instances of an application's execution. Could be similar to a .properties file (I see those a lot on Java projects).

1

A plist is essentially just a data file, it stores information in a documented format.

From Wikipedia:

In the Mac OS X Cocoa, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as plist files. Property list files are often used to store a user's settings. They are also used to store information about bundles and applications, a task served by the resource fork in the old Mac OS.

0

Info.plist is key/value persistence storage(property list) which is used system and user. It contains user-friendly text in XML format. Info.plist is mandatory file for any Bundle. For example it contains Bundle id[About] which is usually is used by system but as a programmer/user you are not limited on changing/reading[More]. The same as you can add K/V for your own purposes. You could noticed that some frameworks forces you to add K/V into your's application to identify you or some other cases.

[Info.plist location]

[Vocabulary]

Floating Button

Button