Skip to main content

Active pens

The SDK accepts signatures drawn with a finger or a capacitive stylus. An active pen improves the experience — the stroke is smoother — and captures the real pressure of every point of the signature, a key feature for the analysis of a signature.

The SDK supports two active pens: Pogo Connect and JotTouch 4. Check the hardware requirements of each pen: not every iOS device supports them.

1. Add the extension​

The libs folder of the distribution contains one extension folder for each pen. Add the folder of your pen to your project, as you did with the SDK frameworks, and link the frameworks it needs:

PenFrameworks
Pogo ConnectCoreBluetooth, AVFoundation
JotTouch 4CoreBluetooth, CoreMotion

2. Register the pen manager​

Reference the pen manager before using the pen, for example in application:didFinishLaunchingWithOptions:, so the SDK can find the extension classes:

#import "PogoPenManager.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[PogoPenManager alloc];
// …
}

3. Enable the pen​

Enable the active pen in the customisation dictionary of the view:

NSMutableDictionary *customDict = [[NSMutableDictionary alloc] init];
[customDict setObject:@YES forKey:ACTIVEPEN_ENABLED];
[customDict setObject:@(ActivePenTypePogo) forKey:ACTIVEPEN_TYPE]; // or ActivePenTypeJotTouch
self.mobbSignView = [[MobbSignView alloc] initWithFrame:self.view.bounds customizationDictionary:customDict];

onActivePenStatusChanged notifies the changes in the connection of the pen.