Skip to main content

Migration guide

We recommend keeping the SDK up to date. This page lists the changes that require action in your code.

Summary​

VersionChangeAction
3.0onDocumentSigned receives more informationUpdate the block
3.0configureLicense:complete: removedUse configureLicense:status:
2.0One block per event; customisation with a dictionaryUpdate the blocks

3.0​

Document signed block​

onDocumentSigned receives the encrypted signature data, the page and the coordinates of the signature:

onDocumentSigned
-^(NSData *signedDocument, UIImage *signatureImage)
+^(NSData *signedDocument, NSData *encryptedSignatureData, UIImage *signatureImage,
+ NSInteger signaturePage, CGRect signatureCoord)

License​

configureLicense:complete:, which only returned whether the license was valid, has been replaced by configureLicense:status:, which returns the license state and its expiry date:

License
-[mobbSignView configureLicense:key complete:^(BOOL result) { … }];
+[mobbSignView configureLicense:key status:^(MobbSignLicenseResult result, NSDate *expirationDate) { … }];

Signed custom fields​

The new method addSignedCustomField:value: writes a field in the signed information of the signature. See Custom fields.

2.0​

One block per event​

The MobbSignProgressUpdater protocol and LicenseDelegate have been removed. Set a block for each event you need, and receive the result of the license in the block of configureLicense.

Customisation​

Configure the view with a dictionary of customisation properties and pass it to the initialiser:

NSMutableDictionary *customDict = [[NSMutableDictionary alloc] init];
// Customisation properties
MobbSignView *mobbSignView = [[MobbSignView alloc] initWithFrame:frame customizationDictionary:customDict];