Dev:SBIconModel

SBIconModel is a singleton class embodying all of the logic behind home screen pages and the dock. As of iPhone OS 3.1, it also handles communicating with the Applications tab in iTunes 9.

This class is only a model. To control the icon lists, you should use the SBIconController singleton class.

Communication with iTunes 9's Applications tab
As of iTunes 9, Apple's Applications tab allows users to rearrange applications on their home screens. However, certain scenarios, such as modified dimensions on SBIconList or defining a new maximum amount of pages on SBIconModel, aren't expected by iTunes, and it then either completely scrambles your home screen's arrangement on every sync involving applications or simply crashes iTunes.

Communication with iTunes is handled by two methods on SBIconModel: exportState and importState:. exportState returns an array of all icon lists and dictionary representations of the icons inside them. This is what iTunes will use to display the icons in the Applications tab. Any installed applications that are missing from the array this returns (due to LibHide, or having too many icons for the max amount of icon lists) will be appended by iTunes itself. importState: is the method called when iTunes proposes a new home screen arrangement. Ignoring all propositions from iTunes is as simple as hooking this method and returning NO.

Runtime icon insertion
With a simple hook to SBIconModel's -loadAllIcons one can add icons to SpringBoard's homescreen. However, this requires subclassing SBIcon or one of its subclasses in the runtime.