- May 27, 2010
- Reaction score
- Austin, TX
Widgets for iOS 5 can be developed even if Apple has not released any programs that could let users actually develop the widgets. Hello World is the text displayed by the first widget developed for the new Notification Center. This proves that users will be able to install widgets for certain apps from Cydia although Apple does not allow that. Hello World also proves how easy it is to develop widgets for the new Notification Center.
Apple has not officially informed whether or not the company will offer iOS app developers the APIs that will allow them to create widgets for their own apps but it appears developers no longer need Apples APIs. Hello World proves that widgets can indeed be integrated in the Notification Center, but Apple could still embed its official APIs that would enable all developers to create such widgets. Thus users would have the chance to choose from a wider array of apps that could integrate this feature.
If you are interested, here are the steps you need to follow in order to create app widgets:
Custom Notification Center Widgets (WeeApps) by @WillFour20
This is a very bare example of how to add a custom widget to the iOS 5 notification centre.
All it really does is say Hello World for now.
Its pretty easy to understand, you create a class that implements the BBWeeAppController protocol. The only required function you must have is - (UIView *)view in which you must return the view that you want to appear. There are also other methods in the protocol for launching URLs when tapped and for rotation detection, view height, etc.
I dont yet know how to set the name in the Settings.app but it seems that the icon shown is set by setting the app identifier in Info.plist of the app which icon you want. (e.g. to get your custom widget to have the Safari icon set the AppBundleID in Info.plist to com.apple.mobilesafari)
Custom bundles are placed in /System/Library/WeeAppPlugins/
This is a pretty bad example but im sure some great stuff can come out of this.
This does not show up correctly in the Settings.app, it appears without a name and a messed up icon.
By Radu Tyrsina