We explore the structure of the applications in macOS and iOS! #2
Welcome back to the second part of the previous article of this series: if you have not read, you can do so by clicking on this link! In this final part we finish the discussion on the structure of the app.
The file Info.the plist is located in the directory Contents/ app and contains the metadata of the bundle. What is it and why is it so important?
It is a very important file, because it provides the system with information to determine the dependencies that are required for the proper functioning of the app and other various properties. The format of this document can be of three types:
All three of these formats are of course supported natively, and the choice of which file type to use is entirely personal. Of course it is much easier to read a XML file or JSON instead of a binary, however, there is a tool called plutil that allows quick conversion among the different types of format.
Each application should have an Info file.plist so that your system can read and work according to the values it contained. In fact, when a new project is created in XCode. is supplied a default Info file.plist with default settings, which can then be customized.
The Resources directory contains all files needed for the correct functioning of the application. These resources typically consist of elements such as images, icons, sounds, file, file, string, configuration files, and data files. This is one of the great advantages of the format bundle because unlike other operating systems, in which the resources must be compiled into the executable, bundle, to allow the resources to remain separate; this makes the executable much lighter and also the update can be performed in a selective way.
The storyboard is the graphical representation of the user interface of an application (iOS/macOS, which shows the screen expanded to an app and the connections between the various views. A storyboard is composed of a sequence of scenes, each of which represents a controller of the view; the scenes are linked by objects, called below, which represent the transition between two views
A folder .lproj folder contains the localization files for the app in the macOS/iOS, files in the storyboard (or .nib) for a given language together with a file of strings and images. There are so many folders .lproj, how many are the languages that are supported by the application: each language, and then his personal lproj folder.
Quite intuitively, each app contains one or more icons. Usually you never have just one because each mode of operation involves a method of displaying icons different. Just think of what happens while we open the multitask, on the iPhone: beyond the screen of the open app there is also icon of the app, with a very small size. All this leads us to say that there are several versions of the same icon, characterized by a specific size.
The last important file that an application contains, you CodeResources, which is a symbolic link to _CodeSignature/CodeResources. This file is a property list which contains a list of all the files inside the bundle. The file CodeResources helps to understand if an application is intact or damaged, in addition to prevent accidental changes or corruption of the resources of the bundle.
Also this article is all about! For any questions, curiosity or feedback you can leave a comment below, see you soon!
Link to the original article: we Explore the structure of the applications in macOS and iOS! #2