How do I give my bundle an icon?

Is it possible to have a special icon for my bundles and frameworks ?

You can't give any bundles other than applications an own icon by specifying it in their plist. MacOS X (10.2.6 at the time of writing) doesn't search the other bundles for icons.

The best thing you can do is to make the host application claim your bundle's extension (make sure you mark the suffix as being on a bundle) and assign your icon to it (assuming your bundle doesn't have the default ".bundle" or ".plugin" extension), or give your bundle a custom icon (i.e. set the hasCustomIcon flag and add an "icon[return]" file with an 'icns' resource id -16455).