Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Created January 30, 2020 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anupamchugh/2a95ad5e12cc64450cbe3cb0bb1372c8 to your computer and use it in GitHub Desktop.
Save anupamchugh/2a95ad5e12cc64450cbe3cb0bb1372c8 to your computer and use it in GitHub Desktop.
func getAlternateIconNames(){
if let icons = Bundle.main.object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any],
let alternateIcons = icons["CFBundleAlternateIcons"] as? [String: Any]
{
for (_, value) in alternateIcons{
guard let iconList = value as? Dictionary<String,Any> else{return}
guard let iconFiles = iconList["CFBundleIconFiles"] as? [String]
else{return}
guard let icon = iconFiles.first else{return}
iconNames.append(icon)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment