ashish | Posts: 2

iOS app templates offline use

0 votes
Hi my requirement is I want to download the templates and use them in offline signature capture? Does iOS sdk support downloading of templates and and applying them on documents in offline? Can templates be edited with pre populated data in offline using iOS sdk?

Duo_Liang | Posts: 3776

Reply to: iOS app templates offline use

0 votes
Hi ashish, Sorry for the late reply, I am not familiar with iOS SDK so it took me some time to investigate into it (but I do have some knowledge on Android SDK). I found some functions declaration in eSignLive.h file which may interest you: #1. grab all template list:
/**
 @abstract
 *  Enumerations defining Additional filter Params when fetching a list of templates
 */
typedef enum {
    kESLTemplatesTypeCreatedByCurrentUser = 100,  //all templates created by the current user.
    kESLTemplatesTypeCached = 101,                //only cached templates.
    kESLTemplatesTypeAll = 102,                   //all account shared and the templates created b the user.
    
} ESLTemplatesType;


/**
 *  Method to get the template list for sertain type
 * This method is created to be used with Swift (Because of Swift's problems with Objective-C enums
 *  Please note the filtering is still not implemented (aFilter parameter)
 *  params
 *  aType (int) - the type of the templates:
 * 0: kESLTemplatesTypeCreatedByCurrentUser
 * 1: kESLTemplatesTypeCached
 * 2: kESLTemplatesTypeAll
 *  aFilter (NSString *) - the filter string (Ex: if you set aFilter to "financial" the result will contain only templatess from the type you spwcified,
 that have the word financial in their name or description). It can be nil.
 *  aFrom (int) the starting index of the template
 *  templatesNumber (int) the number of the requested templates - together with aFrom it could be used to implement paging of the template requests
 *  aCallback - the block executed after the response is available. The callback has NSDictionary * parameter containig the response data.
 */
- (void)templatesForType:(ESLTemplatesType)aType
                  filter:(NSString *)aFilter
            fromTemplate:(int)aFrom
         templatesNumber:(int)templatesNumber
            withCallback:(void (^)(NSDictionary *response))aCallback;
#2. download and cache template locally with template id:
/**
 *  Download/Cache a Template for offline use
 *  params
 *  aTemplateID (NSString *)
 *  Callback. Block to get the success response or error reponse
 *  callback Dictionary can be of the type data:,error:
 *  If error object exists, data is invalid
 */
- (void)downloadTemplateWithID:(NSString *)aTemplateID andCallback:(void (^)(NSDictionary *response))aCallback;
#3. create a draft transaction by template id (if the network is disconnected, it will try finding the cached template):
/**
 *  Method that creates a transaction draft from a template
 *  params
 *  aGUID (NSString *) - the template guid.
 *  aCallback - the block executed after the template is fetched and the transaction is created. The callbac has NSDictionary * parameter
    contining details about the new transaction.
 */
- (void)createDraftFromTemplateWithGUID:(NSString *)aGUID withCallback:(void (^)(NSDictionary *response))aCallback;
Hope this could help! Duo

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off