Login to follow
App Icon Plugin

App Icon Plugin (ODC)

Stable version 1.0.1 (Compatible with ODC)
Uploaded on 21 Jan by Paulo Solipa
App Icon Plugin

App Icon Plugin (ODC)

Documentation
1.0.1

Detailed documentation in How to Dynamically Change Your OutSystems Capacitor Mobile App Icon in ODC (Android + iOS)


Configurations

Step 1 — Upload icon resources

Upload your icons in Resources and use the naming convention:

  • ic_icon1.png, ic_icon2.png, …

The recommended size for the icons is 1024×1024, because both platforms handle resizing well from a universal asset.


Set Deploy Action to Deploy to target directory so the files are included in the build output.


Step 2 — Upload the YAML file and reference it in Extensibility Configurations

Upload your YAML (e.g., appIcons.yaml) to Resources and set it to Deploy to target directory.

Then configure the buildAction in your mobile app’s extensibility configurations:

{
    "buildConfigurations": {
        "buildAction": {
            "config": "$resources.appIcons.yaml"
        }
    }
}

An example of the YAML file for the build actions is provided in the demo and plugin's repo.


Step 3 — Ensure iOS icon files are included in the iOS project

On iOS, the alternate icons must exist in the project bundle with the exact names referenced in Info.plist (icon1, icon2, etc.). Configure iOS resources mapping:

{
    "buildConfigurations": {
        "buildAction": {
            "config": "$resources.appIcons.yaml"
        },
        "resources": {
            "ios": [
                {
                    "source": "$resources.ic_icon1.png",
                    "target": "icon1.png"
                },
                {
                    "source": "$resources.ic_icon2.png",
                    "target": "icon2.png"
                }
            ]
        }
    }
    
}

Note: the target name matches what you used under CFBundleAlternateIcons (icon1, icon2) plus the file extension.


Using the App Icon Plugin

App Icon Plugin has three different client actions available. The key ones are:

  • ChangeIcon

Changes the app's icon to the desired one.

Inputs:

  • Alias: the alias to enable, prefixed with a dot, e.g. .icon1
  • Aliases: CSV of available Android aliases (also prefixed with a dot), e.g .icon1,.icon2 (Ignored on iOS)


  • ResetIcon

Resets the app icon back to the original one.

Input:

  • Aliases: same CSV list used in ChangeIcon client action (Ignored on iOS)