Migration guide
We recommend keeping the SDK up to date. This page lists the changes that require action in your code.
Summary
| Version | Change | Action |
|---|---|---|
| 3.0 | onDocumentSigned receives more information | Update the block |
| 3.0 | configureLicense:complete: removed | Use configureLicense:status: |
| 2.0 | One block per event; customisation with a dictionary | Update the blocks |
3.0
Document signed block
onDocumentSigned receives the encrypted signature data, the page and the coordinates of the signature:
-^(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:
-[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];