app icon name (???.icns) not always same as the app name
Hello friends,
I've noticed that some apps have a different designation for their .icns than their app name. I can use finder to drill down to /Contents/Resources to find the icon name for a given application (visually). For example, I've noticed that the Calendar app has 'App.icns' and not 'Calendar.icns'.
I need to be able to do this programmatically. i.e. find the right icns for any app. Any suggestions, code samples, etc...?
I hope I've formulated my question clearly and correctly.
Thank you for your help.