Migration 1.x to 2.x version
This document is intended to highlight the main changes from the previous 1.x version and the 2.0 version. For more information, please refer to the javadoc included in the SDK distribution file.
How to get notified about events
Starting 2.0 version, the MobbSignProgressUpdater protocol no longer exist and now there are individual blocks that you can define to listen to each event. For example, if you want to implement some action when the user is signed by a user, you can do it this way now:
[mobbSignView setOnDocumentSigned:^(NSData * signedDocument, UIImage * signatureImage)
{
NSLog(@"onDocumentSigned");
}];
In the same way, LicenseDelegate do not longer exist, and now you will be informed of the result of the license checking in a block passed on the configureLicense method.
[mobbSignView configureLicense:@"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" complete:^(BOOL result)
{
if (!result) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"License Invalid" message:@"License is not valid" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
}
}];
View customization
The customization properties available are now defined in the MobbSignCustomizationProperties class. To customize your view, configure a NSDictionary with your customization values and then use this dictionary to initialize the MobbSignView:
NSMutableDictionary * customDict = [[NSMutableDictionary alloc] init];
// Set all your desired customization values here
MobbSignView *mobbSignView = [[MobbSignView alloc] initWithFrame:wholeWindow customizationDictionary:customDict];
MobbID integration
The new version comes with a MobbID extension that allows the app to verify the user signature before actually signing the document. Please refer to the documentation for an explanation of how to implement this functionality.