Hattabitos

Create transaction from template iOS SDK

0 votes
Can you please provide us the code on how to create a transaction from a template using the iOS SDK

Reply to: Create transaction from template iOS SDK

0 votes
Hi there, To create a transaction from a template from iOS, there’s a function including in the eSignLive.h header file:
- (void)createDraftFromTemplateWithGUID:(NSString *)aGUID withCallback:(void (^)(NSDictionary *response))aCallback;
And you can invoke the function in this way:
eSignLive.dashboard().createDraftFromTemplate(withGUID: "Z0P-GnprcP94hjwS6oPWpd1opzc=",withCallback:  {(dict: [AnyHashable : Any]?) -> Void in
            
            if let myDict = dict, let guid = myDict["guid"] as? String {
            eSignLive.dashboard().startEditingTransaction(withGUID: guid, canAddDocuments: true, canDeleteDocuments: true, canReorderDocuments: true)
            print(myDict)
            }
            
        })
In this example, I manually input the template ID. What this function does is to create a draft package cloning from the template by ID. So you will see this draft package in your web portal in real time: In callback function, it returns a dictionary containing the relevant info regarding to this draft package, and then, client can use package ID to start a package creation page like below: Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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