Skip to content

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

Closed

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>

Activity

  1. added
    enhancement
    on Sep 21, 2021
  2. added this to the Future milestone on Sep 21, 2021
  3. added
    dotnet
    iOS
    macOS
    dotnet-pri3
    and removed
    dotnet
    on Sep 21, 2021
  4. modified the milestones: Future, .NET 6 on Sep 21, 2021
  5. removed
    dotnet-pri3
    on Apr 4, 2022
  6. modified the milestones: .NET 6, .NET 7 on Apr 4, 2022
  7. added
    high-priority
    on Jul 21, 2022
  8. added
    dotnet-pri0
    on Aug 23, 2022
  9. modified the milestones: .NET 7, .NET 8 on Aug 26, 2022
  10. yuriibabii commented on Sep 6, 2023

    @yuriibabii

    Hey guys, I found a hackish way to do that. You might want to check it out:
    https://stackoverflow.com/a/77050207/6157156

  11. modified the milestones: .NET 8, .NET 9 on Sep 6, 2023
  12. lakhan-bairawat commented on Jun 17, 2024

    @lakhan-bairawat

    how we can achieved this in android
    like :- iOS Apps support the ability to [set alternate app icons]

  13. modified the milestones: .NET 9, .NET 10 on Sep 27, 2024
  14. self-assigned this
    on Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dotnetdotnet-pri0enhancementhigh-priorityiOSmacOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions