Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›Configure the SDK

MobbSign iOS

  • Welcome to the MobbSign SDK

Configure the SDK

  • Configure the SDK
  • Getting started with MobbSign
  • MobbSign Additional Configuration
  • MobbSign Advanced features
  • Add a watermark to the signature

Migration Guides

  • Migration 1.x to 2.x version
  • Migration 2.x to 3.x version

Changelogs

  • iOS changelog

Getting started with MobbSign

Initialization

First step is always initializing the API. You need to this before any other action or SDK will not work. You need your license key to complete this step.

So, set up the license id and listen to the possible result:

from [mobbSignView configureLicense: complete:] to [mobbSignView configureLicense:     status:] where status block receives license status enum and expiration date, so     preferred configure license method will look like:

[mobbSignView configureLicense:@"XXXXXXXX­XXXX­XXXX­XXXX­XXXXXXXXXXXX"     status:^(MobbSignLicenseResult result, NSDate *expirationDate) {
    switch (result) {
            case MobbSignLicenseResult_DEVICES_EXCEEDED:
            case MobbSignLicenseResult_EXPIRED:
            case MobbSignLicenseResult_NOT_VALID: {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"License Invalid"     message:@"License is not valid" delegate:self cancelButtonTitle:@"Ok"     otherButtonTitles:nil];
            [alert show];
            break;
            }
            case MobbSignLicenseResult_GRACE_PERIOD:
                    NSLog(@"License in grace period (expires %@)", expirationDate);
                    break;
            case MobbSignLicenseResult_VALID:
                    NSLog(@"Valid license (expires %@)", expirationDate);
                    break;
            default:
                    break;
        }
}];
  • Current [mobbSignView configureLicense: complete:] is now deprecated and will be removed when MobbSignSDK 3.0 ships.

Configuring the SDK

Configure the public key that is going to be used to encrypt the biometric data embedded to the document:

NSString* keyPath = [[NSBundle mainBundle] pathForResource:@"public" ofType:@"key"];
[mobbSignView setEncryptionKey:keyPath];

NOTE: A test public key is delivered with the simple demo project, but you will need a production one before launching your product.

Define your own listeners and implement the events you need to know about:

[self.mobbSignView setOnDocumentShown:^(BOOL)editable
{
    NSLog(@"onDocumentShown");
}];

[self.mobbSignView setOnDocumentSigned:^(NSData *signedDocument, NSData *encryptedSignatureData, UIImage *signatureImage, NSInteger signaturePage, CGRect signatureCoord)
{
    NSLog(@"onDocumentSigned");
}];

[self.mobbSignView setOnSignatureAcquised:^
{
    NSLog(@"onSignatureAcquised");
}];

[self.mobbSignView setOnSignatureDeleted:^
{
    NSLog(@"onSignatureDeleted");
}];

[self.mobbSignView setOnProcessEnd:^(NSData *signedDocument)
{
    NSLog(@"onProcessEnd");
}];

[self.mobbSignView setOnErrorOccurred:^(int errorCode)
{
    NSLog(@"onErrorOccurred");
}];

[self.mobbSignView setOnBackButtonPressed:^
{
    NSLog(@"onBackButtonPressed");
}];

[self.mobbSignView setOnSignButtonPressed:^
{
    NSLog(@"OnSignButtonPressed");
}];

[self.mobbSignView setOnActivePenStatusChanged:^
{
    NSLog(@"OnActivePenStatusChanged");
}];

[self.mobbSignView setOnLocationRetrieved:^(MobbSignLocationResult result)
{
    NSLog(@"OnLocationRetrieved");
}];

Start process

Once the API is initialized and the SDK is configured as you need it, you have to start a new scan process.

Let's go to load the document:

NSString* fullPath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"pdf"];
[mobbSignView loadPDFDocument:fullPath name:@"Sample document"];

Different ways to load documents

  1. From document source:

    - (void)loadPDFDocument:(NSString*)path name:(NSString*)name;
    
  2. From document source with data on editable document fields:

    - (void)loadPDFDocument:(NSString*)path name:(NSString*)name fields:(NSDictionary*)fields;
    
  3. Passing data file content:

    - (void)loadPDFDocumentFromData:(NSData*)documentData name:(NSString*)name;
    
  4. Passing data file content with preloading data on editable document fields:

    - (void)loadPDFDocumentFromData:(NSData*)documentData name:(NSString*)name fields:(NSDictionary*)fields;
    
← Configure the SDKMobbSign Additional Configuration →
  • Initialization
  • Configuring the SDK
  • Start process
  • Different ways to load documents
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL