
Beginning Mac OS X Tiger Dashboard Widget Development (2006)
.pdf
C
Widget Distribution
Now that you’ve written a widget — or two — you may be ready to go beyond emailing them to a few of your closest friends. You may be ready to share them with the world. This appendix talks about the best places to upload your widgets and some of the issues of distribution.
Where to Post Your Widget
Shrinkwrap software is almost a thing of the past. Small developers no longer have to worry about dealing with distributors, paying for media duplication and packaging, and producing the right number of packages for brick-and-mortar stores. All of those expensive distribution methods have been replaced by Web distribution. You can put up a website and let everyone know that your widgets are available. In some cases, you don’t even have to put up a website.
Apple
To get the most exposure, Apple’s Dashboard Downloads page is probably the best place to upload your widgets. Other widget collections are available in addition to individual developer’s sites, but Dashboard Downloads is perhaps the single place that everyone goes to look for new widgets. It is a well-known central repository, it has submission guidelines at www.apple.com/downloads/ dashboard/submit/index.html (Figure C-1), and all of the widgets are checked before they are placed for download.

Appendix C
Figure C-1
However, Apple can’t be your only distribution point, because you must provide one working link to download the software. The submission guidelines also point out that the widget must have a supporting website. You must have full rights to distribute the widget and must not have violated the intellectual property rights of others. Your widget should also have a complete feature set, but you’d never release betaware, would you?
Other Websites
In addition to Apple’s Dashboard Downloads, you can find other locations on the Internet where you can post your widgets. As noted in Appendix B, Dashboard Widgets (www.dashboardwidgets.com/) is a good community site in addition to being a well-organized showcase of widgets. Dashboard Widgets has a submissions form that isn’t as restrictive as Apple’s, and your widgets will be reviewed before placed for download.
The most obvious place to post your widgets is on your personal website. It may not get as much traffic as Apple’s, but you can provide support and additional information about your widget. If you don’t have a personal website, you can get a .Mac account where you can share files or you can probably get a website through your ISP. Just remember, however, that if your widgets are popular, you may exceed the monthly bandwidth limitations.
302

Widget Distribution
Should You Charge for Your Widget?
This is a complicated question. While some people frown on charging for widgets, widgets are software. The more useful widgets are, the greater the likelihood that users will pay for them. If you’ve spent a great deal of time on the design and functionality of your widget, and it looks like a professional piece of software, go for it.
Some developers have already decided to charge, but on a donationware basis, which is similar to shareware but not as demanding. If the user likes your widgets, he can make a donation through PayPal or Kagi as an incentive to keep you working on widgets. You can also disable some features until the user makes a donation and receives a registration code. Widget Machine’s NotePad, for example, has a timeout feature and stops working once you have used it longer than the specified time.
One thing to keep in mind is that widgets are based on open standards and are not compiled software. Anyone can examine your code unless you move the important functionality into a plugin.
Post It!
Okay, you’ve created a widget, you’ve run it though the testing gauntlet with friends or your QA lab, and you’ve fixed all of the bugs and even added some additional features. You are ready to upload it, but what do you need to do first?
Getting Ready to Post
Whether you choose to use a .Mac account or another personal website, you’ll need to make certain that the widget installs properly whenever the user downloads it. This would be worth a little testing time.
You’ll need to make an archive of your widget to upload it. You can do this by Control-clicking or rightclicking on your widget in the Finder and selecting the Create archive of . . . command from the contextual menu. This creates a ZIP file that you’ll be able to upload to your web server. When you download the widget from your website using Safari, it is automatically expanded and you are prompted to install the widget. It is placed in your /Library/Widgets/ folder, Dashboard is opened, and you are prompted to keep the widget or remove it. You may want to test the download and install process with Firefox to see if the download functions the same way. If it doesn’t and the user has to manually install your widget, you may want to include that information on the download page. Apple’s Installation Guidelines (www.apple.com/downloads/dashboard/submit/installers.html) have text that you can add to your download page and covers automatic as well as manual installation.
In its Installation Guidelines (Figure C-2), Apple notes that if you want users to purchase the widget, complete a registration, or read an end-user license agreement, you should have them do this at your website before downloading the widget. These tasks are more easily accomplished through a website than through the widget. Always keep your users in mind and make downloading and installation as simple as possible.
303

Appendix C
Figure C-2
Submitting to Apple’s Dashboard Downloads
Now that you have prepared your widget to upload to widget collections and you have tested the download from your personal website, you are ready to submit the widget to Apple’s Dashboard Downloads.
The submittal form (www.apple.com/downloads/dashboard/submit/submit.html) is straightforward and asks for contact and product information. You’ll need to have a product summary and description for your widget in addition to version information, requirements, size, the download links, and a screenshot. Once you click the Submit button, you just have to wait until your widget has been reviewed and is available for everyone to download and begin submitting feature requests.
304

SYMBOLS AND
NUMERICS
{ } (braces), errors from omitting, 78
# (hash sign) before names in CSS, 62, 163
– (minus sign) in Widgets widget, 8
. (period) before names in CSS, 62
+ (plus sign) in lower-left portion of screen, 4 " (quotation marks), errors from omitting, 78 3D Clock applet, 190–194
8-bit Unicode Transformation Format (UTF-8), 26, 72
A
access keys. See also specific keys for Amazon Album Art widget, 230 for command-line access, 171–174 debugging, 78
for Easy Envelopes widget, 180, 203 for file system access, 170–171
for full access, 179–180
for iPhoto Mini widget, 256–257
for iTunes Connection Monitor widget, 268 for Java applet access, 178–179
for More Widgets widget, 279 for network access, 174–176 overview, 169
for QuickTime plugin, 176, 186 for SecureCopy widget, 214 for 3D Clock applet, 191
for Tile Game widget, 170, 171
for Timbuktu Quick Connect widget, 245 for WeatherMaps widget, 174–176
for WebKit and plugin access, 176 for Widget plugin access, 177–179 activating the Dashboard, 113–116
Activity Monitor, 117–119, 194
Index
Index
alert() function, 81–83
AllowFileAccessOutsideOfWidget access key for Amazon Album Art widget, 230
for iPhoto Mini widget, 256–257 overview, 24, 170–171
for QuickTime plugin, 186 for SecureCopy widget, 214
for Tile Game widget, 170, 171
AllowFullAccess access key, 24, 179–180, 203
AllowInternetPlugins access key, 25, 176, 186
AllowJava access key, 25, 178–179, 191
AllowMultipleInstances property key, 25
AllowNetworkAccess access key for Amazon Album Art widget, 230
debugging connection problems and, 78 for Easy Envelopes widget, 180 Info.plist file for, 174–175
for More Widgets widget, 279
not required for passing URLs to browser, 176 overview, 25
for SecureCopy widget, 214
for WeatherMaps widget, 174–176
AllowSystem access key
for Amazon Album Art widget, 230 asynchronous usage and, 173–174 for command-line access, 171–172
debugging shell command problems and, 78 for iTunes Connection Monitor widget, 268 overview, 25
synchronous usage and, 173
for Timbuktu Quick Connect widget, 245 widget.system() method for, 172, 173–174
Amazon Album Art widget access keys, 230
AppleScripts, 230, 236–237, 238–240 converting JPEG artwork to PICT format, 239–240 CSS file, 230, 231–234




