What is the Property List or plist in IOS .

For me and Every IOS App developer like me, info.plist or property list is a well-known file for them. it’s not just a file but a bundle of instructions wrapped in a file.

What is plist file

Property List file is a structured text file that contains essential configuration information for a bundled executable. The file itself is typically encoded and the contents are structured using XML. The root XML node is a dictionary, whose contents are a set of keys and values describing different aspects of the bundle. The system uses these keys and values to obtain information about your app and how it is configured. As a result, all bundled executables (plug-ins, frameworks, and apps) are expected to have an information property list file.

root-plist

Creating or Edit an Information Property List File

When we create a new project on Xcode this file is bundled with the project ( means this file is automatically generated with other basic files )

The simplest way to create an information property list file is to let Xcode create it for you. Each new bundle-based project that you create in Xcode comes with a file named –Info.plist, where is the name of the project. At build time, this file is used to generate the Info.plist file that is then included in the resulting bundle.

CFBundleDevelopmentRegion : The default language and region for the bundle, as a language ID.

CFBundleExecutable : Name of the bundle’s executable file.

CFBundleIdentifier : An identifier string that specifies the app type of the bundle.

CFBundleInfoDictionaryVersion : Version information for the Info.plist format.

CFBundleName : The short name of the bundle.

CFBundlePackageType : The four-letter code identifying the bundle type.

CFBundleShortVersionString : The release-version-number string for the bundle.

CFBundleVersion : The build-version-number string for the bundle.

LSRequiresIPhoneOS : A Boolean value indicating whether the app must run in iOS.

UIApplicationSceneManifest : The information about the app's scene-based life-cycle support.

UILaunchStoryboardName : The filename of the storyboard from which to generate the app’s launch image.

UIMainStoryboardFile : The name of the app’s main storyboard file.

UIRequiredDeviceCapabilities : The device-related features that your app requires to run.

UISupportedInterfaceOrientations : The interface orientations supported by your app.

root-plist-xml

Custom Keys

IOS and macOS ignore custom keys you include in an Info.plist file. If you want to include app-specific configuration information in your Info.plist file, you can do so freely as long as your key names do not conflict with the ones Apple uses. When defining custom key names, prefix them with a unique prefix, such as your app’s bundle ID or your company’s domain name, to prevent conflicts.

Happy Coding 🙂


Discover more from CODE t!ps

Subscribe to get the latest posts sent to your email.

Scroll to Top

Discover more from CODE t!ps

Subscribe now to keep reading and get access to the full archive.

Continue reading