Dev:Updating extensions for iOS 13

Let's collect knowledge like we did with iOS 12, iOS 11, iOS 10, iOS 9, iOS 8 and iOS 7 – paste in your notes and share what you've learned, and somebody else will organize it later. :) If you want to ask questions and share tips over chat with other developers, see How to use IRC for how to connect to #theos and #iphonedev.

SBApplication -(FBScene*)mainScene removed
was removed in iOS 13. It can be accessed from a SBApplication by replacing  with the following:

being the name of your SBApplication instance.

SBRootIconListView
This class was removed entirely with iOS 13. Root Icon Lists are now instances of.

SBIconListFlowLayout
Layout handling in iOS 13 now uses. These are provided by an instance of.

This alone handles row/column count. It also contains a, which controls the spacing and location of icons.

SBIconListGridLayoutConfiguration
This class contains several properties that can be modified to alter the layout.

Selectors of interest include  and. These return an instance of  that can be used to manipulate layout.

Modifying number of rows and columns
It now depends on "where" you want to change the number of rows and columns. If you want to adjust the values for the icons in Home Screen (and Home Screen with Today widgets in iPad), you can conditionally apply that for the icon location, like so:

%hook SBHDefaultIconListLayoutProvider - (SBIconListGridLayout *)makeLayoutForIconLocation:(NSString *)iconLocation { SBIconListGridLayout *layout = %orig; if ([iconLocation hasPrefix:@"SBIconLocationRoot"]) { SBIconListGridLayoutConfiguration *config = [layout valueForKey:@"_layoutConfiguration"]; config.numberOfLandscapeRows += 1; config.numberOfLandscapeColumns += 2; config.numberOfPortraitRows += 1; config.numberOfPortraitColumns += 2; } 	return layout; } %end

Generating an apps icon image
Previously an icon image could be generated from an icon object like so

In iOS 13 this method was changed to