Skip to main content
Blog
Home/

Trending Topics: Latest from our forums (April 2021)

Author Inbar Gazit
Inbar GazitSr. Manager, Developer Content
Summary4 min read

See how our most popular recent threads on StackOverflow can help you solve your own development issues.

    • Additional resources

    Table of contents

    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.

    https://stackoverflow.com/questions/66913596/

    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

    https://stackoverflow.com/questions/66983509/

    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

    https://stackoverflow.com/questions/66969169/

    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.

    Answer: 

    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: @"johndoe@example.com"] 
            addSignerName: @"IPS - John Local Doe"] 
            addRoutingOrder: 1] 
        build];
    
    

    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

    Author Inbar Gazit
    Inbar GazitSr. Manager, Developer Content

    Inbar Gazit has been with Docusign since 2013 in various engineering roles. Since 2019 he has focused on developer content. Inbar works on code examples including the launchers, available on GitHub in eight languages, and helps build sample apps showcasing the various Docusign APIs. He is also active on StackOverflow, answering your questions. Inbar can be reached at inbar.gazit@docusign.com.

    More posts from this author

    Related posts

    • Docusign 2024 Release 3: Capture the Critical Business Value Hidden in Your Agreements
      Intelligent Agreement Management

      Docusign 2024 Release 3: Capture the Critical Business Value Hidden in Your Agreements

    • How to improve your app’s UX while users wait for API calls to complete

      How to improve your app’s UX while users wait for API calls to complete

      Author Larry Kluger
      Larry Kluger
    • Trending Topics: Latest from our forums (November 2024)
      Author Paige Rossi
      Paige Rossi
    How to improve your app’s UX while users wait for API calls to complete

    How to improve your app’s UX while users wait for API calls to complete

    Author Larry Kluger
    Larry Kluger
    Trending Topics: Latest from our forums (November 2024)
    Author Paige Rossi
    Paige Rossi

    Discover what's new with Docusign IAM or start with eSignature for free

    Explore Docusign IAMTry eSignature for Free
    Person smiling while presenting