Adding an icon to the dock

  • How do I add my application's icon to the doc programatically?
  • Basically, you don't. The dock is the user's domain. If you could
    programatically add icons to the dock, everyone would do it, and your
    average user's dock would be a huge mess.

    Steve Israelson wrote:
    > How do I add my application's icon to the doc programatically?
  • iWork does it, and so does Microsoft.

    On 2-Nov-07, at 5:27 PM, John Stiles wrote:

    > Basically, you don't. The dock is the user's domain. If you could
    > programatically add icons to the dock, everyone would do it, and
    > your average user's dock would be a huge mess.
    >
    >
    > Steve Israelson wrote:
    >> How do I add my application's icon to the doc programatically?
    >>
  • Well, there's a plist file inside the user's Library somewhere, and
    if you are brave enough to reverse-engineer and modify it, there's
    your answer :)
    I once heard that DTS had a code snippet for this, but it wasn't
    guaranteed to work between major OS releases and it was discouraged
    to use it.

    On Nov 2, 2007, at 6:00 PM, Steve Israelson wrote:

    > iWork does it, and so does Microsoft.
    >
    > On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >
    >> Basically, you don't. The dock is the user's domain. If you could
    >> programatically add icons to the dock, everyone would do it, and
    >> your average user's dock would be a huge mess.
    >>
    >>
    >> Steve Israelson wrote:
    >>> How do I add my application's icon to the doc programatically?
    >>>
  • Could you be a little more specific? I've never seen either
    application do this.

    Sent from my iPhone

    On Nov 2, 2007, at 6:00 PM, Steve Israelson <sisraelson...> wrote:

    > iWork does it, and so does Microsoft.
    >
    > On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >
    >> Basically, you don't. The dock is the user's domain. If you could
    >> programatically add icons to the dock, everyone would do it, and
    >> your average user's dock would be a huge mess.
    >>
    >>
    >> Steve Israelson wrote:
    >>> How do I add my application's icon to the doc programatically?
    >>>

  • I am inclined to tell my client "No", in fact that is my current answer.
    If you just install iWork, you will know how it, well, works.

    On 2-Nov-07, at 6:27 PM, Colin Cornaby wrote:

    > Could you be a little more specific? I've never seen either
    > application do this.
    >
    > Sent from my iPhone
    >
    > On Nov 2, 2007, at 6:00 PM, Steve Israelson <sisraelson...>
    > wrote:
    >
    >> iWork does it, and so does Microsoft.
    >>
    >> On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >>
    >>> Basically, you don't. The dock is the user's domain. If you could
    >>> programatically add icons to the dock, everyone would do it, and
    >>> your average user's dock would be a huge mess.
    >>>
    >>>
    >>> Steve Israelson wrote:
    >>>> How do I add my application's icon to the doc programatically?
    >>>>
  • I see what you mean. For some reason I thought you somehow meant you
    wanted to spawn another app icon or something.

    As the other poster mentioned, messing with the plist is the easiest
    way to do this. If you just generate a uuid, set the URL of the new
    item, and set the tile type you should be fine. Then restart the Dock.

    As the other poster said, the docks plist format is not guaranteed to
    stay the same, so writing the least information possible is the best
    way to reduce the possibility of breakage.

    Sent from my iPhone

    On Nov 2, 2007, at 6:31 PM, Steve Israelson <sisraelson...> wrote:

    > I am inclined to tell my client "No", in fact that is my current
    > answer.
    > If you just install iWork, you will know how it, well, works.
    >
    > On 2-Nov-07, at 6:27 PM, Colin Cornaby wrote:
    >
    >> Could you be a little more specific? I've never seen either
    >> application do this.
    >>
    >> Sent from my iPhone
    >>
    >> On Nov 2, 2007, at 6:00 PM, Steve Israelson <sisraelson...>
    >> wrote:
    >>
    >>> iWork does it, and so does Microsoft.
    >>>
    >>> On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >>>
    >>>> Basically, you don't. The dock is the user's domain. If you could
    >>>> programatically add icons to the dock, everyone would do it, and
    >>>> your average user's dock would be a huge mess.
    >>>>
    >>>>
    >>>> Steve Israelson wrote:
    >>>>> How do I add my application's icon to the doc programatically?
    >>>>>
  • More importantly though is that even *if* iWork does it, that does not
    make it right for you, nor does it make it user friendly. Apple can
    get away with this, but most other folks can't.

    While placing the icons on the dock may seem acceptable from a Windows
    perspective, it is very non-Mac and as a user, it ticks me off that a
    program would do something like that.

    It's easy enough for users to put the app in their dock if they feel
    it is important enough. But IMHO, it is arrogant for a company to
    think it deserves to insert its icons into my dock automatically. It
    also would make me suspect that the given program is likely to break
    other guidelines. It just leaves a bad taste in my mouth hearing about
    it.

    On 11/2/07, Colin Cornaby <colin.cornaby...> wrote:
    > I see what you mean. For some reason I thought you somehow meant you
    > wanted to spawn another app icon or something.
    >
    > As the other poster mentioned, messing with the plist is the easiest
    > way to do this. If you just generate a uuid, set the URL of the new
    > item, and set the tile type you should be fine. Then restart the Dock.
    >
    > As the other poster said, the docks plist format is not guaranteed to
    > stay the same, so writing the least information possible is the best
    > way to reduce the possibility of breakage.
    >
    > Sent from my iPhone
    >
    > On Nov 2, 2007, at 6:31 PM, Steve Israelson <sisraelson...> wrote:
    >
    >> I am inclined to tell my client "No", in fact that is my current
    >> answer.
    >> If you just install iWork, you will know how it, well, works.
    >>
    >> On 2-Nov-07, at 6:27 PM, Colin Cornaby wrote:
    >>
    >>> Could you be a little more specific? I've never seen either
    >>> application do this.
    >>>
    >>> Sent from my iPhone
    >>>
    >>> On Nov 2, 2007, at 6:00 PM, Steve Israelson <sisraelson...>
    >>> wrote:
    >>>
    >>>> iWork does it, and so does Microsoft.
    >>>>
    >>>> On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >>>>
    >>>>> Basically, you don't. The dock is the user's domain. If you could
    >>>>> programatically add icons to the dock, everyone would do it, and
    >>>>> your average user's dock would be a huge mess.
    >>>>>
    >>>>>
    >>>>> Steve Israelson wrote:
    >>>>>> How do I add my application's icon to the doc programatically?
    >>>>>>

    >

    --
    Mark Munz
    unmarked software
    http://www.unmarked.com/
  • Am 03.11.2007 um 00:48 schrieb Steve Israelson:
    > How do I add my application's icon to the doc programatically?

    Hi Steve, :-)

      that should happen automatically. You usually add your icon to your
    app's resources as a .icns file, and then you specify its name in the
    Target settings (Properties tab). This will add it to the Info.plist,
    where Finder etc. look for it.

      Command-line tools and other non-bundled apps generally don't show
    up in the dock. Could that be your problem? Is your app special in any
    other way, that this doesn't happen for it?

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
  • On Nov 3, 2007, at 1:17 AM, Mark Munz wrote:

    > Apple can
    > get away with this, but most other folks can't.

      Why?

      What I mean is, why can Apple or others get away with it? Just
    because they're Apple (or some other large corporation) you're less
    angry with them for putting an icon on your dock? That seems silly.

      I *agree* with you that apps shouldn't do this - if I wanted the
    app on my dock, I'd put it there - but that commonly-repeated reason
    makes no sense. Some like it and some don't mind. The entity doing it
    doesn't matter.

      Here're some real reasons not to:

      - Drag-install apps should never simply automatically place
    themselves *anywhere*. It's counter-intuitive and keeping track of
    whether the user actually wants you to requires storing that "DO-NOT-
    WANT!" value somewhere. If that value is lost (resetting preferences,
    etc.) you've annoyed your user yet again.

      - Modifying the dock's PLIST directly could potentially damage it
    if changes are made. Users don't always upgrade before running an app
    on a new OS. See what happens to you if you damage something and
    people lose their list of dock icons -- I know I get a bit lost (due
    to muscle memory) if I suddenly have to rebuild my dock.

      - To pull this trick off, you have to forcibly kill the dock
    (allowing it to restart). The silly reason that it's "jarring"
    notwithstanding, it could potentially lose settings the user just made
    (if they weren't yet written). You can't know everything about timing
    and what the user's doing just prior to killing one of the single most
    important applications on their computer.

    --
    I.S.
  • Well, I am referring to during install.
    The installer installs the app, then places an icon of it in the dock.

    On 3-Nov-07, at 4:42 AM, Uli Kusterer wrote:

    > Am 03.11.2007 um 00:48 schrieb Steve Israelson:
    >> How do I add my application's icon to the doc programatically?
    >
    >
    > Hi Steve, :-)
    >
    > that should happen automatically. You usually add your icon to your
    > app's resources as a .icns file, and then you specify its name in
    > the Target settings (Properties tab). This will add it to the
    > Info.plist, where Finder etc. look for it.
    >
    > Command-line tools and other non-bundled apps generally don't show
    > up in the dock. Could that be your problem? Is your app special in
    > any other way, that this doesn't happen for it?
  • One issue my clients always mention is that most users are not that
    computer savvy.
    They end up running the app from a disk image or cd-rom all the time
    because they see the icon there.
    They even run an installer, and still run the app from the disk image.
    If there was ONLY an installer for them to see, and then it installed,
    put the icon in the dock for them, then they would not have to worry.
    It is even suggested that I launch the app, and close the disk image
    and trash it for the user once the install is complete.

    Me, being a savvy user, just cringes, like most of you, when I hear
    this, but the problems these users have are real ones and how to make
    those users lives easier is the problem to solve.

    On 3-Nov-07, at 6:51 AM, I. Savant wrote:

    > On Nov 3, 2007, at 1:17 AM, Mark Munz wrote:
    >
    >> Apple can
    >> get away with this, but most other folks can't.
    >
    > Why?
    >
    > What I mean is, why can Apple or others get away with it? Just
    > because they're Apple (or some other large corporation) you're less
    > angry with them for putting an icon on your dock? That seems silly.
    >
    > I *agree* with you that apps shouldn't do this - if I wanted the
    > app on my dock, I'd put it there - but that commonly-repeated reason
    > makes no sense. Some like it and some don't mind. The entity doing
    > it doesn't matter.
    >
    > Here're some real reasons not to:
    >
    > - Drag-install apps should never simply automatically place
    > themselves *anywhere*. It's counter-intuitive and keeping track of
    > whether the user actually wants you to requires storing that "DO-NOT-
    > WANT!" value somewhere. If that value is lost (resetting
    > preferences, etc.) you've annoyed your user yet again.
    >
    > - Modifying the dock's PLIST directly could potentially damage it
    > if changes are made. Users don't always upgrade before running an
    > app on a new OS. See what happens to you if you damage something and
    > people lose their list of dock icons -- I know I get a bit lost (due
    > to muscle memory) if I suddenly have to rebuild my dock.
    >
    > - To pull this trick off, you have to forcibly kill the dock
    > (allowing it to restart). The silly reason that it's "jarring"
    > notwithstanding, it could potentially lose settings the user just
    > made (if they weren't yet written). You can't know everything about
    > timing and what the user's doing just prior to killing one of the
    > single most important applications on their computer.
    >
  • On Nov 3, 2007, at 12:50 PM, Steve Israelson wrote:

    > One issue my clients always mention is that most users are not that
    > computer savvy.

      Making (potentially dangerous) modifications to your users
    computers to overcompensate for a small percentage of users who don't
    know how to use their computers is a rather bad idea. However, if you
    *must* do this, make it an installer script and ask the user if they
    want to install the app in their dock.

    > Me, being a savvy user, just cringes, like most of you, when I hear
    > this, but the problems these users have are real ones and how to
    > make those users lives easier is the problem to solve.

      This is for Apple to resolve as the maker of the operating system,
    not individual developers. File an enhancement request on the
    installer app or the OS in general. In the meantime, you can argue
    with your client that such forcible modifications to the dock's
    preferences are potentially dangerous and it's not up to individual
    authors to take such risks to 'help' the smaller percentage of users
    who can't be bothered to read the manual and learn how to install
    applications.

      I have argued and will continue to argue this with clients in the
    past (successfully) on similar points. You're *always* going to have
    illiterate users. Why short-circuit things and punish the rest just
    for them?

    --
    I.S.
  • On Nov 3, 2007, at 9:50 AM, Steve Israelson wrote:

    > One issue my clients always mention is that most users are not that
    > computer savvy.
    > They end up running the app from a disk image or cd-rom all the time
    > because they see the icon there.

    I run apps from disk images all the time. If I decide I'm going to
    keep the app I then copy it to /Applications. Applications should not
    care where they are launched from. However, I can see how novice users
    would then eject the image or CD and then be confused about the app
    disappearing.

    > They even run an installer, and still run the app from the disk image.

    Your image has both an installer and the application on the disk
    image? You should sick to one or the other, not both.

    > If there was ONLY an installer for them to see, and then it
    > installed, put the icon in the dock for them, then they would not
    > have to worry.
    > It is even suggested that I launch the app, and close the disk image
    > and trash it for the user once the install is complete.

    Modifying the user's dock is not okay. Besides, the dock is already
    chock full of application icons. How do you know where in the dock to
    put the new icon? There is no guarantee the user will see it there
    either, especially if the dock is hidden.

    It sounds like you should ship an internet enabled disk image. An
    internet enabled disk image mounts, copies it's contents to the folder
    the image is placed in (typically the desktop or the downloads
    folder), and then places itself in the trash. If the only thing in the
    image is your installer or application there is nothing left to
    confuse the user.

    > Me, being a savvy user, just cringes, like most of you, when I hear
    > this, but the problems these users have are real ones and how to
    > make those users lives easier is the problem to solve.

    Solving the problem of the novice user at the expense of the savvy
    user is the wrong solution. Don't fiddle with the user's dock. If your
    problem is with the usage model of standard disk images, you should
    use IDME images or switch to zip files.

    Dave
  • I haven't looked in to this at all, but is the Dock scriptable?  Is
    there a way you could do this via AppleScript or an Automator workflow?

    Dave DeLong

    On 3 Nov, 2007, at 10:50 AM, Steve Israelson wrote:

    > One issue my clients always mention is that most users are not that
    > computer savvy.
    > They end up running the app from a disk image or cd-rom all the time
    > because they see the icon there.
    > They even run an installer, and still run the app from the disk image.
    > If there was ONLY an installer for them to see, and then it
    > installed, put the icon in the dock for them, then they would not
    > have to worry.
    > It is even suggested that I launch the app, and close the disk image
    > and trash it for the user once the install is complete.
    >
    > Me, being a savvy user, just cringes, like most of you, when I hear
    > this, but the problems these users have are real ones and how to
    > make those users lives easier is the problem to solve.
  • Am 03.11.2007 um 17:46 Uhr schrieb Steve Israelson:

    > Well, I am referring to during install.
    > The installer installs the app, then places an icon of it in the dock.

    Please, people, for the love of Bob: don't do that!

    If installers begin to place arbitrary icons in my dock, I'm going to
    file a bug with Apple that this is at all possible. Maybe they can
    encrypt the plist or something ...

    Andreas
  • I thought about this for a bit on the train last night, so I've got my
    thoughts all assembled on this matter. :)

    I work in IT in a very large %99 Macintosh organization, so I usually
    get to see firsthand all the issues that users run into. By far, the
    biggest issue I run into is that users use the Dock as a crutch. Back
    when we ran OS 9, users were forced to understand that the
    applications folder is where applications live. But with OS X, users
    seem to have no idea that the applications folder is even there. Quite
    simply, if the application isn't on the dock, it doesn't exist to the
    user. I'll often install a new application on a large number of
    machines, and if I forget to put it onto the dock, I'll immediately
    get feedback that the application was never installed at all, simply
    because the user can't find it on the dock.

    (It would be great though if Apple included a little gnome with every
    Mac that would pop out when the user first started up the machine and
    explained the concept of the applications folder. Given how large of
    an organization we have, it's not realistic for us to sit every user
    down and teach them how to use the applications folder, and then teach
    them again a week later when they forget.)

    I myself hate when things add themselves to the dock. If anything adds
    itself to the dock without asking me, it gets immediately removed from
    my machine. I've actually run into this once before. The HP Deskjet
    drivers add a little docklet to the dock automatically, and when I
    removed it, they actually had a script that on login would put it back
    in. Needless to say the Deskjet drivers never got installed on my
    machine ever again.

    But given the mentality of novice users that I've mentioned above, I
    can perfectly understand an installer asking if it should add items to
    the Dock, as long as by default it is set to not add itself to the
    Dock, and obviously it has to ask first.

    With regards to Apple officially supporting the behavior... The system
    administration guides that Apple has published describe how to
    programatically add items to the Dock, and they basically consist of
    what I wrote before. Just edit the com.apple.dock.plist file, and
    restart the Dock. Given that this technique is not given by Apple in a
    developer context, it's probably not guaranteed to work in all
    versions of OS X.

    On Nov 2, 2007, at 10:17 PM, Mark Munz wrote:

    > More importantly though is that even *if* iWork does it, that does not
    > make it right for you, nor does it make it user friendly. Apple can
    > get away with this, but most other folks can't.
    >
    > While placing the icons on the dock may seem acceptable from a Windows
    > perspective, it is very non-Mac and as a user, it ticks me off that a
    > program would do something like that.
    >
    > It's easy enough for users to put the app in their dock if they feel
    > it is important enough. But IMHO, it is arrogant for a company to
    > think it deserves to insert its icons into my dock automatically. It
    > also would make me suspect that the given program is likely to break
    > other guidelines. It just leaves a bad taste in my mouth hearing about
    > it.
    >
    >
    > On 11/2/07, Colin Cornaby <colin.cornaby...> wrote:
    >> I see what you mean. For some reason I thought you somehow meant you
    >> wanted to spawn another app icon or something.
    >>
    >> As the other poster mentioned, messing with the plist is the easiest
    >> way to do this. If you just generate a uuid, set the URL of the new
    >> item, and set the tile type you should be fine. Then restart the
    >> Dock.
    >>
    >> As the other poster said, the docks plist format is not guaranteed to
    >> stay the same, so writing the least information possible is the best
    >> way to reduce the possibility of breakage.
    >>
    >> Sent from my iPhone
    >>
    >> On Nov 2, 2007, at 6:31 PM, Steve Israelson <sisraelson...>
    >> wrote:
    >>
    >>> I am inclined to tell my client "No", in fact that is my current
    >>> answer.
    >>> If you just install iWork, you will know how it, well, works.
    >>>
    >>> On 2-Nov-07, at 6:27 PM, Colin Cornaby wrote:
    >>>
    >>>> Could you be a little more specific? I've never seen either
    >>>> application do this.
    >>>>
    >>>> Sent from my iPhone
    >>>>
    >>>> On Nov 2, 2007, at 6:00 PM, Steve Israelson <sisraelson...>
    >>>> wrote:
    >>>>
    >>>>> iWork does it, and so does Microsoft.
    >>>>>
    >>>>> On 2-Nov-07, at 5:27 PM, John Stiles wrote:
    >>>>>
    >>>>>> Basically, you don't. The dock is the user's domain. If you could
    >>>>>> programatically add icons to the dock, everyone would do it, and
    >>>>>> your average user's dock would be a huge mess.
    >>>>>>
    >>>>>>
    >>>>>> Steve Israelson wrote:
    >>>>>>> How do I add my application's icon to the doc programatically?
    >>>>>>>

    >>
    >
    >
    > --
    > Mark Munz
    > unmarked software
    > http://www.unmarked.com/
  • Am 03.11.2007 um 17:50 schrieb Steve Israelson:
    > It is even suggested that I launch the app, and close the disk image
    > and trash it for the user once the install is complete.
    >
    > Me, being a savvy user, just cringes, like most of you, when I hear
    > this, but the problems these users have are real ones and how to
    > make those users lives easier is the problem to solve.

      Or you could just internet-enable your disk image or use a ZIP file
    and avoid the problem altogether. If your app extracts into an
    application file in the downloads folder or on the desktop, users
    won't have a problem starting it.

      It's only those who insist on disk images just because Apple used to
    recommend them on 10.0 because they had no other non-lossy compression
    format in the OS back then whose users have problems with this.

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
  • Am 03.11.2007 um 18:10 schrieb I. Savant:
    > Making (potentially dangerous) modifications to your users computers
    > to overcompensate for a small percentage of users who don't know how
    > to use their computers is a rather bad idea.

      Just to clarify: To get the dock to show your icon, you have to
    'killall Dock' to restart it. The trouble here is that Dashboard hangs
    off the dock (at least in 10.4), so you're not just restarting the
    dock, you may also be causing loss of data in dashboard and a few
    other dock-related services.

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
  • Folks, this discussion has fast veered far away from the issue of
    developing Cocoa apps and into the user experience realm entirely
    outside of development.

    Discussions about automatically inserting icons into the dock, the
    pros and cons of drag and drop installs, the ins and outs of disk
    images, etc.. These are all inappropriate for discussion here.

    Please take it elsewhere

    (bcc'd to all the thread contributors)

    Thanks

    Scott

    On Nov 3, 2007, at 4:17 PM, Colin Cornaby wrote:

    > I thought about this for a bit on the train last night, so I've got
    > my thoughts all assembled on this matter. :)

    > <snip>
  • Am 04.11.2007 um 00:43 schrieb Scott Anguish:
    > Discussions about automatically inserting icons into the dock, the
    > pros and cons of drag and drop installs, the ins and outs of disk
    > images, etc.. These are all inappropriate for discussion here.
    >
    > Please take it elsewhere

    You're cordially invited to

    <http://groups.yahoo.com/group/mac-gui-dev/>

    where stuff like this (but also actual implementation of such stuff)
    is highly on topic. Hope to see you there.

      *takes off his used-car-salesman-hat again*

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today