I have add this to my project.xml file to try and add an icon to a Mac application:
<assets path="assets" rename="assets" />
<assets path="assets" include="*.css" />
<assets path="assets" include="icon.icns" />
I see this icon in the application’s resources and in the Info.plist:
<key>CFBundleIconFile</key>
<string>icon.icns</string>
Still the icon does not render. Any pointers on how to fix this?
I’ve never tried using .icns files with OpenFL, so I’m just guessing here
Since you didn’t move it somewhere else, the file is probably at assets/icon.icns in the .app bundle. So icon.icns may not be the complete path. It may be worth trying assets/icon.icns as your custom value for CFBundleIconFile instead.
1 Like
Thanks. I think I found the solution. What I ended up doing is modifying the Info.plist file from:
<key>CFBundleIconFile</key>
<string>icon.icns</string>
to
<key>CFBundleIconFile</key>
<string>icon</string>
Then in the app bundle I moved the icon.icns from
Resources/assets/
to
Resources/
Now the icon is showing.