Created
January 30, 2020 20:21
-
-
Save anupamchugh/2a95ad5e12cc64450cbe3cb0bb1372c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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