Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Alternate Icons in Asset Catalogs (Xcode 13+) #1261

Closed
dflems opened this issue Nov 12, 2021 · 6 comments · Fixed by #2505 or revolut-mobile/rules_apple#5
Closed

Support Alternate Icons in Asset Catalogs (Xcode 13+) #1261

dflems opened this issue Nov 12, 2021 · 6 comments · Fixed by #2505 or revolut-mobile/rules_apple#5

Comments

@dflems
Copy link
Contributor

dflems commented Nov 12, 2021

https://katzenbaer.medium.com/alternate-app-icons-using-asset-catalogs-in-xcode-13-da6387d1cd78

Xcode 13+ lets you put alternate icons in asset catalogs now. This could be probably be supported by ios_application and friends in a backwards compatible way:

ios_application(
    name = "MyApp",
    resources = glob(["CatalogIncludingAlternateIcons.xcassets/**"]),
    appicon_name = "AppIcon",

    # equivalent of ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS
    # pass --include-all-app-icons into actool in Xcode 13+
    # copy all appiconset images into the bundle in Xcode 12 and under
    include_all_appicons = True,

    # equivalent of ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES
    # pass --alternate-app-icon into actool for each one in Xcode 13+
    # copy these appiconsets into the bundle in Xcode 12 and under, exclude others
    alternate_app_icons = ["alticon1", "alticon2"],
)
@keith
Copy link
Member

keith commented Nov 12, 2021

#1032 ?

@brentleyjones
Copy link
Collaborator

Asset catalogs being the main difference with Xcode 13+.

@dflems
Copy link
Contributor Author

dflems commented Nov 12, 2021

@keith Being able to use them in asset catalogs is new

@keith
Copy link
Member

keith commented May 26, 2022

Is the old way still supported for iOS 15+? Or do you have to use this new behavior?

@dflems
Copy link
Contributor Author

dflems commented May 27, 2022

@keith I'm not sure. I assume the old way probably still works (copying them into the bundle and referencing them in Info.plist explicitly)

@wendyliga
Copy link

wendyliga commented Oct 17, 2023

I create a PR for this here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment