Skip to content

Add support for alternate app icons, and MSBuild items/properties to include them in Info.plist #12790

@Redth

Description

@Redth

iOS Apps support the ability to set alternate app icons

Currently there's an info.plist key XSAppIconAssets which specifies which icon is to be used as the primary/default app icon.

Can we modernize how we include these assets by allowing support for MSBuild items/properties, and also include the ability to include multiple icon assets and have them all registered properly in the info.plist?

Something like this:

<ItemGroup>
  <!-- One icon can be primary -->
  <BundleResource Include="Assets.xcassets/appicon.appiconset" RegisterPrimaryBundleIcon="True" />

  <!-- Zero or more alternate icons -->
  <BundleResource Include="Assets.xcassets/alternateappicon.appiconset" RegisterAlternateBundleIcon="True" />
  <BundleResource Include="Assets.xcassets/alternateappicon2.appiconset" RegisterAlternateBundleIcon="True" />
</ItemGroup>

In the Info.plist would generate something like this:

<key>CFBundleIcons</key>
<dict>
  <key>CFBundlePrimaryIcon</key>
  <dict>
    <key>CFBundleIconName>
    <string>appicon</string>
    <key>CFBundleIconFiles</key>
    <array><!-- ... --></array>
  </dictionary>
  
  <key>CFBundleAlternateIcons</key>
  <dict>
    <key>alternateappicon</key>
    <dict>
      <key>CFBundleIconFiles</key>
      <array><!-- ... --></array>
    </dict>
    <key>alternateappicon2</key>
    <dict>
      <key>CFBundleIconFiles</key>
      <array><!-- ... --></array>
    </dict>
  </dict>
</dict>

Metadata

Metadata

Assignees

Labels

dotnetAn issue or pull request related to .NET (6)dotnet-pri0.NET 6: required for stable releaseenhancementThe issue or pull request is an enhancementhigh-priorityThis is a high-priority issue or pull requestiOSIssues affecting iOSmacOSIssues affecting macOS

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions