App Icon

#Overview

Return the app icon as a base64-encoded string.

#How It Works

The plugin first attempts to find an existing app-icon.png file directly within the scanned directory. If found, it reads this file and returns its base64-encoded content.

If app-icon.png does not exist, the plugin then looks inside the unzipped/Payload directory for the .app folder. Inside the .app folder, it searches for a file matching AppIcon.*\.png$ or Icon.*\.png$(case-insensitive). If an icon file is found, it uses the defryPngutility to optimize and save this icon as app-icon.png in the root of the scanned directory.

The appIcon plugin stores its computed data (the base64-encoded icon string) in a file named app-icon.png within the scan directory. To retrieve this data, the plugin simply reads this file and converts it to a base64 string.

#Example Output

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA... (truncated base64 string)"