Trending Topics: Latest from our forums (April 2021)

Trending Topics

Here are some of the latest popular questions that the DocuSign developers community asked on Stack Overflow in the month of April 2021. You too can ask questions by using the tag docusignapi in Stack Overflow.

Thread: Getting consent for a console application

Summary: The developer is building a console application without any web component. They are concerned that all authentication methods require end-user authentication and consent and that they will therefore be unable to implement them in a console app.

Answer: Using the JSON Web Token (JWT) approach is suitable for applications that do not have UI or have only a console (command line interface) for their users. While you still need to obtain a user’s consent, this only has to be done once per user/app. This can be done outside the app by either using individual consent or using administrative consent. The app itself does not need to have any web interface. 

Thread: How to resolve totally app freeze after DocuSign login

Summary: The developer is using the DocuSign Mobile SDK to build an iOS application that integrates with the DocuSign eSignature REST API. They see their app freeze after the user logs in to DocuSign and must restart the app at that point. 

Answer: To resolve this issue, the developer had to move their call to DSMManager.setup() to be made after the applicationDidLaunch event has fired. That guarantees that the app is in a ready state to be able to authenticate with DocuSign correctly.

Thread: Cannot create an envelope using online signing mode

Summary: The developer is composing an envelope on an iOS device using the DocuSign Mobile SDK. To create the envelope on a device using EnvelopeDefinition, the developer is assigning recipients, tabs, and document details to prepare EnvelopeDefinition and trying to launch the signing UI on the iOS app. They are getting an error, “Envelope creation online is not supported at this moment. Please try offline mode.” trying to sign such an envelope. Later on, developers also ran into the “Envelope is ready for sync and can not be resumed for signing.” error.


Part 1, Addressing the “Envelope creation online is not supported at this moment. Please try offline mode.” error: As of the current Mobile SDK version, creating online envelopes with EnvelopeDefinition is not yet supported. The following method is only supported for remote envelopes that have been already created (via the DocuSign eSignature REST API or the web app) and accessible on the DocuSign account under use by the Native SDK.

envelopesManager.presentSigning(withPresenting:, enveloped: , animated:, completion)

Another option is to use the Compose flow–based envelope creation that enables you to use the PDF from the bundle, position tabs, and present signing in offline mode. The iOS SDK  guide Compose Envelope lists steps with sample code to get the desired result. The following snippet from the Compose Envelope guide shows how to present such an envelope for signing:

if (envelope) { 
   // Compose the envelope to automatically cache it 
   [self.envelopesManager composeEnvelopeWithEnvelopeDefinition: envelope signingMode: DSMSigningModeOffline completion: ^(NSString * _Nullable envelopeId, NSError * _Nonnull error) { 
      // error checks in case envelope compose failed. Also use notifications for caching related events. 
      if (error) { ... } 
      // Resume the envelope to start the signing process 
      [self.envelopesManager resumeSigningEnvelopeWithPresentingController: self envelopeId: envelopeId completion: ^(UIViewController * _Nullable presentedController, NSError * _Nullable error) { 
      // error checks in case UI presentation failed. Use notifications for other events. 
      if (error) { ... } 

Part 2, Addressing the “Envelope is ready for sync and can not be resumed for signing.” error:

This error denotes that the envelope has no local signers awaiting signing. This happens when all of the recipients added to EnvelopeDefinitions are remote (non-local) signers and signing cannot be continued on the device. To resolve this issue, the developer had to add a local signer (in-person signer, or self as remote signer) using the following method.

// Create an envelope recipient with name and email and assign an id and type with routing order 
DSMEnvelopeRecipient *recipient = [[[[[[[DSMRecipientBuilder builderForType: DSMRecipientTypeInPersonSigner] 
        addRecipientId: @"1"] 
        addHostName: @"John Doe"] 
        addHostEmail: @""] 
        addSignerName: @"IPS - John Local Doe"] 
        addRoutingOrder: 1] 

Configuring the recipient objects correctly allowed developers to sign the envelope as offline-envelope and send it to DocuSign servers with the syncEnvelopes call.

Additional resources

Inbar Gazit
Inbar Gazit
Sr. Manager, Developer Content