I am running RUN AND DEBUG on VSCode with my sample application. The icon on the dock is the stardard icon.
How to add add in icon and what format does it need to use, ICO, JPG or PNG?
I am running RUN AND DEBUG on VSCode with my sample application. The icon on the dock is the stardard icon.
How to add add in icon and what format does it need to use, ICO, JPG or PNG?
Heh. We don’t have that built-in yet.
that said, you can just drop an Info.plist file into the directory where the main project file is and it should merge that into the one in the bundle, so you could specify it in there… or just use plistbuddy to do it manually.
create a info.plist with the following text with the image MainIcon.png on the same folder and got the following error "Buoy: build failed — error: /Users/Development/BUOY_SYSTEMS/Info.plist expected inside the root , found ".
what is wrong with the info.plist file??
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- --------------------------------------------------------------
Bundle identifiers – the unique key Apple looks for.
------------------------------------------------------------ -->
<key>CFBundleIdentifier</key>
<string>com.mediatec.myapp</string>
<key>CFBundleName</key>
<string>myapp</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<!-- --------------------------------------------------------------
Icon – tells macOS which PNG should be used for the Dock and Launchpad.
------------------------------------------------------------ -->
<key>CFBundleIcons</key>
<dict>
<!-- Main icon that appears in Finder, on the Dock, etc. -->
<key>CFBundleIcon</key>
<string>MainIcon.png</string>
</dict>
</dict>
Opening that file in Xcode I get the error:
Failed to open property list: Encountered unexpected EOF
Two caveats: you can’t put -- inside the comment (double hyphens aren’t allowed until the closing -->), and comments can’t be nested.
Take the comments out or don’t use hyphens as a line
is the following ok???
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>MainIcon.png</string>
</dict>
</plist>
I don’t believe you can use png files. My recollection is that they must be icns format.
Don’t worry, we’ll get there. Just not today.
P.S. - seems there’s a bug that causes it to overwrite the whole plist with whatever you put in instead of merging them, so I’ll need to get that fixed soon.
I try icns file.. and put on the same folder as the Info.plist.
don’t worry about this.. I was just curious