Skip to main content

Configuration

License​

The license key is bound to the bundle identifier of your app. The SDK validates it online the first time it is used and every time it expires and is renewed.

[self.mobbSignView configureLicense:licenseKey status:^(MobbSignLicenseResult result, NSDate *expirationDate) {
switch (result) {
case MobbSignLicenseResult_VALID:
break;
case MobbSignLicenseResult_GRACE_PERIOD:
// Valid for a limited time: renew the license
break;
case MobbSignLicenseResult_EXPIRED:
case MobbSignLicenseResult_NOT_VALID:
case MobbSignLicenseResult_DEVICES_EXCEEDED:
// Documents can be viewed, but not signed
break;
default:
break;
}
}];
ResultMeaning
MobbSignLicenseResult_VALIDThe license is valid. expirationDate is its expiry date.
MobbSignLicenseResult_GRACE_PERIODThe license could not be validated, but the SDK keeps working during a grace period of 30 days.
MobbSignLicenseResult_EXPIREDThe license has expired.
MobbSignLicenseResult_NOT_VALIDThe license is not valid for this app.
MobbSignLicenseResult_DEVICES_EXCEEDEDThe license has reached its maximum number of devices.

To sign with an electronic seal through MobbSign Server, initialise the SDK with initAPI instead of configureLicense. See Signature with electronic seal.

Encryption key​

setEncryptionKey: receives the path of the public key that encrypts the biometric data of every signature. Without it, documents cannot be signed.

Events​

BlockCalled when
onDocumentShownThe document has been loaded and shown. It receives editable: YES if the document contains form fields.
onSignButtonPressedThe user taps Sign.
onSignatureAcquisedThe user has drawn a signature, before it is confirmed.
onSignatureDeletedThe user has deleted the signature drawn.
onDocumentSignedA signature has been added to the document.
onBackButtonPressedThe user taps Back.
onProcessEndThe user has finished. It receives the signed document.
onErrorOccurredAn error has occurred. It receives the error code.
onActivePenStatusChangedThe connection status of the active pen has changed.
onLocationRetrievedThe location of the device has been obtained, or could not be.

onDocumentSigned receives the details of the signature just added:

ParameterDescription
signedDocumentThe signed document.
encryptedSignatureDataThe encrypted signature data: biometric data, document hash and the rest of the signature information.
signatureImageThe image of the signature.
signaturePageThe page where the signature has been placed.
signatureCoordThe coordinates of the signature on the page.

Load a document​

// From a file path
- (void)loadPDFDocument:(NSString *)path name:(NSString *)name;
// From a file path, filling in the form fields
- (void)loadPDFDocument:(NSString *)path name:(NSString *)name fields:(NSDictionary *)fields;
// From data
- (void)loadPDFDocumentFromData:(NSData *)documentData name:(NSString *)name;
// From data, filling in the form fields
- (void)loadPDFDocumentFromData:(NSData *)documentData name:(NSString *)name fields:(NSDictionary *)fields;

Customisation dictionary​

The dictionary passed to initWithFrame:customizationDictionary: configures the behaviour and appearance of the view. The keys are constants such as kMobbSign_SIGNATURE_STROKE_COLOR; the documentation included in the distribution lists them all. The guides describe the keys of each feature:

AreaKeysGuide
GeolocationkMobbSign_DEVICE_ENABLED, kMobbSign_DEVICE_LAST_TIME, kMobbSign_DEVICE_POSITION_ACCURACYGeolocation
Active pensACTIVEPEN_ENABLED, ACTIVEPEN_TYPEActive pens