Auki has had a very basic API for 3rd party developers since 1.0.
+[KJUARR doUrThing:<BBBulletin *>] can be used to activate auki with a BBBulletin (the message notification), or nil to present auki in compose mode. After serval developers requested additional, more extensive APIs, I decided to add a few useful APIs in version 1.3 which was released just this week on Cydia. The old API still works like it did in earlier versions, if you only need the basic API it’s totally fine to keep using it.
also takes an array of images, but supports an additional array of recipient address strings (NSSString objects). These addresses can be phone numbers or emails, specifically. It is safe to pass nil or empty arrays as parameters for both arguments. Keep in mind that recipients are only supported in compose mode, hence the first argument, the BBBulletin notification must be nil.
For the ease of use, below is a header ready to be imported in your projects:
The iOS status bar is an interesting construct many jailbreak developers try to avoid messing with. After some research I thought I’d share some of my achievements to help other developers.
Status bars contain so-called items, for example the WiFi item or the battery item, each item has a unique identifier. With some research I found out most items and their corresponding identifier:
time / clock
quite mode / DND
service item (carrier name)
battery icon + lightning
battery percent, looks same as 8 but isn’t. Maybe the not charging item?
assistant / Siri
activity / loading indicator
thermal color (?)
What to do with these item identifiers? What about enabling or disabling some items globally?
Let’s enable the Siri status bar item:
[[SBStatusBarStateAggregatorsharedInstance]_setItem:20enabled:YES]//Returns a BOOL, YES if the status bar was changed and NO if it was already set
And ta-da, a siri icon in the status bar:
The status bar gets data from the status bar server UIStatusBarServer. The server and the status bar are not directly connected, a status bar state provider is a proxy between the two. A state provider conforms to the UIStatusBarStateProvider protocol, in SpringBoard SBStatusBarStateProvider and its subclasses (SBMainStatusBarStateProvider or SBNotificationCenterStatusBarStateProvider). State providers notify listening status bars about changes and edit the data, shwing or hiding specific items. SBMainStatusBarStateProvider enables and disables the time item dynamically (disabled on the lock screen, enabled otherwise), status bars get data from it by default. Hence to enable or disable the status bar time in (almost) all status bars, call the main state provider:
If you don’t want your status bar to hide the time dynamically, don’t use the main state provider (shown below)!
The status bar can also have different styles, infulencing the foreground and background color or the status bar height (incomplete list!).
Notification center style
Big lockscreen style
When to use these styles is shown in the next paragraph.
Creating status bars
Creating a status bar isn’t very hard:
intstatusBarStyle=0x12F;//Normal notification center styleUIInterfaceOrientationorientation=UIApplication.sharedApplication.statusBar.statusBarWindow.orientation;statusBar=[[UIStatusBaralloc]initWithFrame:CGRectMake(0,0,UIApplication.sharedApplication.statusBar.bounds.size.width,[UIStatusBar.classheightForStyle:statusBarStyleorientation:orientation])showForegroundView:YESinProcessStateProvider:[[[objc_getClass("SBStatusBarStateProvider")alloc]init]autorelease]];[statusBarrequestStyle:statusBarStyle];statusBar.autoresizingMask=UIViewAutoresizingFlexibleWidth;[selfaddSubview:statusBar];//After orientation changes[statusBarsetOrientation:UIApplication.sharedApplication.statusBarOrientation];
In this example we provide a custom state provider, the status bar won’t use the main provider and will always show the time item, even on the lock screen. To use the main provider, initialize the status bar with -initWithFrame: instead.
Don’t forget to call -setOrientation: after initialization or if the interface orientation of your interface changed.
I hope this will help some other developers. If you have additions, please let me know about them.