Skip to content
iMessage typing and read receipt indicators for the iOS status bar
Branch: master
Clone or download
Latest commit da8d52e Mar 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Resources [resources] crush every byte possible out of the images Sep 5, 2016
TypeStatus.xcodeproj [global] set up jazzy docs Mar 16, 2018
api [api] name ourselves Messages for the providers list Mar 22, 2018
client
docs [docs] fix my embarrassing typos Mar 18, 2018
global [global] i forgot we’re blessed by the existence of NSArray.firstObject Mar 22, 2018
messages [global] fix stuff Mar 20, 2019
prefs [global] update urls and stuff Mar 20, 2019
relay [relay] ignore error 1 from LM, somehow returns this despite success Mar 18, 2018
springboard [springboard] remove the warning log in _hasLibstatusbar Mar 21, 2018
.gitignore [gitignore] debs is now packages Jul 25, 2016
.jazzy.yaml [global] set up jazzy docs Mar 16, 2018
LICENSE.md
Makefile [preinst,makefile] ok we can blame this one entirely on me Mar 19, 2018
README.md [global] update urls and stuff Mar 20, 2019
TypeStatus.plist [global] merge all tweak subprojects into the master makefile Mar 18, 2018
TypeStatusClient.plist [global] merge all tweak subprojects into the master makefile Mar 18, 2018
TypeStatusMessages.plist [global] merge all tweak subprojects into the master makefile Mar 18, 2018
TypeStatusRelay.plist [global] merge all tweak subprojects into the master makefile Mar 18, 2018
control [control] 2.4 Mar 20, 2019
postinst [makefile,{pre,post}{inst,rm}] this really sucks 😕 Feb 26, 2018
postrm [api,{pre,post}{inst,rm}] this continues to make me sad Mar 14, 2018
preinst [preinst] breaking this a bit more Apr 14, 2018

README.md

TypeStatus

iMessage typing and read receipt indicators for the iOS status bar. https://typestatus.com/

See also: TypeStatus for Mac.

Creating a TypeStatus provider

Documentation is available at hbang.github.io/TypeStatus.

Make sure TypeStatus is already installed on your device.

Theos includes headers and a linkable framework for TypeStatus, so you don’t need to worry about copying files over from your device.

To develop a provider, create a bundle project. You can do this with a Theos makefile similar to this one:

INSTALL_TARGET_PROCESSES = SpringBoard

include $(THEOS)/makefiles/common.mk

BUNDLE_NAME = MyAwesomeProvider
MyAwesomeProvider_FILES = XXXMyAwesomeProvider.m
MyAwesomeProvider_INSTALL_PATH = /Library/TypeStatus/Providers
MyAwesomeProvider_EXTRA_FRAMEWORKS = TypeStatusProvider

include $(THEOS_MAKE_PATH)/bundle.mk

A provider class subclasses from HBTSProvider. This must be the bundle’s principal class, defined in the Info.plist key NSPrincipalClass. Here is a simple example:

#import <TypeStatusProvider/TypeStatusProvider.h>

@interface XXXMyAwesomeProvider : HBLOProvider

@end
#import "XXXMyAwesomeProvider.h"

@implementation XXXMyAwesomeProvider

- (instancetype)init {
	self = [super init];

	if (self) {
		// do your thing to set up your notifications here…
	}

	return self;
}

- (void)receivedNotification:(NSNotification *)notification {
	// do your thing to get data from the notification here…
	NSString *sender = …;

	HBTSNotification *notification = [[HBTSNotification alloc] initWithType:HBTSMessageTypeTyping sender:sender iconName:nil];
	[self showNotification:notification];
}

@end

Or, alternatively, just create a stub class, and use HBTSProviderController to get an instance of your provider to cal showNotification: on. For instance:

#import "XXXMyAwesomeProvider.h"

@implementation XXXMyAwesomeProvider

@end
#import "XXXMyAwesomeProvider.h"
#import <TypeStatusProvider/TypeStatusProvider.h>

%hook XXXSomeClassInTheApp

- (void)messageReceived:(XXXMessage *)message {
	%orig;

	// do your thing to determine the message type and get data from the notification here…
	if (message.isTypingMessage) {
		NSString *sender = …;

		HBTSNotification *notification = [[HBTSNotification alloc] initWithType:HBTSMessageTypeTyping sender:sender iconName:nil];
		XXXMyAwesomeProvider *provider = (XXXMyAwesomeProvider *)[[HBTSProviderController sharedInstance] providerForAppIdentifier:@"com.example.awesomemessenger"];
		[provider showNotification:notification];
	}
}

%end

The iconName parameter can either be nil to use TypeStatus’s built-in icons for the predefined notification types, or the string of a status bar icon name, installed identically to the way you would for a libstatusbar icon.

You must also add ws.hbang.typestatus2 to the Depends: list in your control file. If TypeStatus isn’t present on the device, your binaries will fail to load. For example:

Depends: mobilesubstrate, something-else, some-other-package, ws.hbang.typestatus2 (>= 2.4)

You should specify the current version of TypeStatus as the minimum requirement, so you can guarantee all features you use are available.

License

Licensed under the Apache License, version 2.0. Refer to LICENSE.md.

See About.plist and our Translations page for credits.

You can’t perform that action at this time.