Creating a Pseudo-Application
Once you understand how the Finder sets application icons, there’s nothing to stop you from building a fake “application” of your own. In these steps, you’ll create a new “application” and assign an icon to it. This creates a completely useless but visually stunning file that sits on your Desktop, and helps you review exactly how application icon assignments work.
Design the art that you’ll use to represent the icon for the fake application and convert it into a .icns file (Figure 4-12). For this example, name the new icon FakeApp.icns.

Figure 4-12. Create art for your fake application icon and convert it into a .icns file.
Create two new folders on your Desktop named Contents and Resources. Place the FakeApp.icns file in the Resources folder, and then drag the Resources folder onto the Contents folder.
Launch the Terminal, and change directories to the Contents folder on your Desktop:
$
cd Desktop/ContentsUse the echo command to create the PkgInfo file, adding the following eight characters to the file (pay attention to upper-and lowercase letters):
$
echo "APPSFooB" > PkgInfoThis command creates the PkgInfo file in the Contents folder, and assigns the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access