Apple claims that if you know how to create a website, you can create a widget. That happens to be true because there’s really not much else to it: widgets are written in html, javascript, ajax and in any other thing that you would use for a website.
There’s a very in-depth tutorial here –> http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_Tutorial/index.html but I’ll give you the basics to get you started:
You only need 4 files to create a widget:
1. Icon.png - You can generate this in any way you want. It must me more less as small as the other icons you see when you add widgets to dashboard.
2. Default.png - This is basically the background of your widget. Again, should be about the size of a regular widget, and you can generate it in any way you want.
3. MyWidget.html - This is what your widget actually does. You can use anything you’d use when writing a website.
4. Info.plist - This is the only relatively difficult thing to do. You can create it with Propertly List Editor and only 5 values are required:
CFBundleIdentifier - E.g. com.apple.widget.MyWidget
CFBundleName - Just the name of your widget
CFBundleDisplayName - Again the name of your widget, except that this is how it will actually appear everywhere
CFBundleVersion - Self explanatory
MainHTML - The name of your MyWidget.html file
That’s it, just put those 4 files in a folder and then rename the folder as MyWidget.wdgt. After it’s changed its extension, you can simply double-click it to install.
Technorati Tags: Developer, Programming, Widgets
jacobmake