oneDocSigner iOS / android library (for webSignatureOffice)

A simple step by step guide on how to use the oneDocSigner iOS / android library for integration in other iOS apps / android apps

This documentation has the purpose of giving an example of the classes, methods and functions of the oneDocSigner library, which can be used by the customer, if he wants to integrate this iOS / android library in existing apps.

The easiest way to use the library is the startSignatureProcess method from the oneDocSignatureController class.

That method has everything needed to sign one document including the button handling during the signature.

For example it can be started like:

self.oneDocSignatureViewController = [[OneDocSignatureViewController alloc] initWithServerUrl:kDefaultServerAddress
										additionalSessionInformation:@"galleta=sabrosa"                                                                          
										documentId:docId
										username:@"username"
										password:@"password"                                                   
										andDelegate:self];


You can call the method with different parameters which are:

  • serverUrl (the webSignatureOffice host)
  • additionalSessionInformation
  • documentId
  • username
  • password

The signature process includes:

  • Login to the given webSignatrueOffice system 
  • Synchronization of the given document
  • Display of the document 
  • Signing 
  • Saving or discarding the changes made to the document
  • Closing the document
  • Synchronisation of the signed document
  • Logout from the webSignatureOffice system

After the whole process the method returns if the process was successfull or not, the return codes are:

  • 100 successfull
  • 101 cancelled
  • 102 server not available
  • 103 synchronization failed



General Functions

Set server URL

setServerAddress, setDefaultServerAddress => ISOSettings 

Set login data

setUsername:andPassword: => ISOSettings.m/.h

Login

loginWithUsername  => ISOSynchronization.m/.h

The login information in the class ISOSynchronization and the method loginWithUsername the library starts a connection with the server to receive all the documents which marked for synchronization on the server for this specific user. 
The method automatically start the synchronization and the connection to the Tyr-Service.

Synchronize document

(void)synchronize:(NSArray*)documentIDs => ISOSynchronization.m/.h

Synchronize all documents

(void)synchronize => ISOSynchronization.m/.h

View document list

(ISODocumentListDataSource*)sharedDocumentListDataSource => ISODocumentListDataSource.m/.h

View document

There are a several methods in the class ISODocumentViewController.h, but your focus is on the method (id)initWithDocument.

Sign all signatures

(void)signAllSignatureFields => ISODocumentViewController.m/.h

Save signature

(NSNumber*)completeSignature => ISODocumentViewController.m/.h

Repeat signature

(void)restartSignature => ISODocumentViewController.m/.h

Cancel signature

(void)cancelSignature => ISODocumentViewController.m/.h

Save signature

completeSignature => ISODOcumentViewController

Fill form fields

If the document has form fields these fields can be accessed by simply tapping on it. There are no specific methods needed to do so.

Save document changes

(void)saveDocument => ISODocumentViewController.m/.h

Discard document changes

revertDocument => ISODocumentViewController.m/.h

Close Document

After the signing process is finished and the signature are saved, the document also needs to be saved before it can be synchronized with the server. 
In the class ISODocumentViewerController.m is the method (void)closeDocumentSaveChanges to close the pdf-document and save all the changes. In this example to save the document with the new signature.

Synchronization of document + signatures

In the class ISOSynchronization.m is the method (void)synchronize. 
The method synchronizes not only the document but also all its meta data (user, form fields, time, etc.)

Download document

(void)downloadDocumentForSigningRequest => ISOSynchronization.m/.h

Log out

- (void)logout => ISOSyncrchonization.m/.h