> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# iOS SDK core interfaces

> The iOS SDK core interfaces are methods that you call to perform basic tasks.

The iOS SDK provides a set of core interfaces that are used with all custom integrations. These core interfaces are methods that you call to perform basic tasks, such as initializing the SDK,   [authenticating](/platform/auth) and logging into a Docusign account within your app, and working with [Docusign objects](/platform/concepts).

Before beginning the development of your app with the iOS SDK, you’ll need to create a [Docusign developer account](https://www.docusign.com/developers/sandbox), if you don’t already have one.

The core interfaces listed in this topic are intended to highlight the most common ones. However, there are many additional classes and methods available in the iOS SDK. Refer to the [SDK references](/docs/mobile-sdks/ios-sdk/reference) for a complete listing of classes and methods. To learn how to write code to use these core interfaces, see [How-to guides](/docs/mobile-sdks/ios-sdk/how-to).

## Authentication and login

After you initialize the iOS SDK, before you make any calls, your mobile app needs to authenticate with the Docusign platform and log in to your account using OAuth 2.0.

For your app to authenticate and log in with the iOS SDK, call the [loginWithAccessToken](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmmanager/loginwithaccesstoken:accountid:userid:username:email:host:integratorkey:refreshtoken:expiresin:completion:/) method of the [DSMManager](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmmanager/) class. The `loginWithAccessToken` method requires several OAuth parameters to be passed in. You need to create and configure an app in the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=appsAndKeys) page in your account to obtain these parameters. See [Authenticate](/platform/auth) to learn more about OAuth and Docusign authentication.

To learn how to authenticate and log in, see [How to log in to Docusign from your app](/docs/mobile-sdks/ios-sdk/how-to/log-in).

## Template caching

If you have created templates in your account by using the Docusign web UI, you can download and cache any of them on a mobile device using the iOS SDK. This enables offline scenarios to still take advantage of the templates you have created, even with no internet connectivity. To learn about templates and how to create them in your Docusign account, see [Create Templates](https://support.docusign.com/s/document-item?language=en_US\&rsc_301\&bundleId=xry1643227563338\&topicId=uab1578456394214.html&_LANG=enus).

> **Note**: Before moving your mobile app to the production environment using [Go-Live](/docs/mobile-sdks/ios-sdk/go-live), create and test your templates in your developer account. Your app cannot locate the templates in your production account from your developer account.

To cache a template with the iOS SDK, call the [cacheTemplateWithId](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmtemplatesmanager/cachetemplatewithid:completion:) method of the [DSMTemplatesManager](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmtemplatesmanager/) class. The `cacheTemplateWithId` method requires the GUID template ID value of the specific template to cache. To learn how to retrieve the ID value of a template, see [Locate a Template ID](https://support.docusign.com/s/document-item?language=en_US\&rsc_301\&bundleId=xry1643227563338\&topicId=yww1578456609051.html&_LANG=enus).

To learn how to cache templates, see Step 2 of [How to create an envelope for offline signing (from a template)](/docs/mobile-sdks/ios-sdk/how-to/offline-signing-template).

## Template sending and signing

If you have created templates in your account by using the Docusign web site, you can use those templates to create envelopes and send requests for signature. To learn about templates and how to create them in your Docusign account, see [Create Templates](https://support.docusign.com/s/document-item?language=en_US\&rsc_301\&bundleId=xry1643227563338\&topicId=uab1578456394214.html&_LANG=enus).

> **Note**: Before moving your mobile app to the production environment using [Go-Live](/docs/mobile-sdks/ios-sdk/go-live), create and test your templates in your developer account. Your app cannot locate the templates in your production account from your developer account.

To send a signature request using a template with the iOS SDK, call the [presentSendTemplateControllerWithTemplateWithId](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmtemplatesmanager/presentsendtemplatecontrollerwithtemplatewithid:signingmode:presentingcontroller:animated:completion:)  method of the [DSMTemplatesManager](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmtemplatesmanager/) class, which requires the GUID template ID value of the specific template to use. To learn how to retrieve the ID value of a template, see [Locate a Template ID](https://support.docusign.com/s/document-item?language=en_US\&rsc_301\&bundleId=xry1643227563338\&topicId=yww1578456609051.html&_LANG=enus).

The `signingMode` parameter indicates whether the SDK should use the online flow (if set to `DSMSigningModeOnline`) or the offline flow (if set to `DSMSigningModeOffline`).

The `presentingController` parameter is the client `ViewController` that will be used to present the SDK signing screens within your mobile app.

To learn how to create an envelope from a template, see [How to create an envelope for offline signing (from a template)](/docs/mobile-sdks/ios-sdk/how-to/offline-signing-template).

## Envelope creation and signing

You don’t need to have templates created in your account to be able to send documents for signature. You can create an envelope, specify documents in the envelope, the recipients for those documents, and the tags within those documents all from within your mobile code using the iOS SDK. See [Docusign objects](/platform/concepts) to learn about these concepts.

To create an envelope to send a signature request without using a template with the iOS SDK, call the [composeEnvelopeWithEnvelopeDefinition](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmenvelopesmanager/composeenvelopewithenvelopedefinition:signingmode:completion:) method of the [DSMEnvelopesManager](https://docusign.github.io/native-ios-sdk/documentation/docusignsdk/dsmenvelopesmanager/) class.

The `signingMode` parameter indicates whether the SDK should use the online flow (if set to `DSMSigningModeOnline`) or the offline flow (if set to `DSMSigningModeOffline`).

To learn how to create an envelope without a template, see [How to create an envelope for offline signing (PDF)](/docs/mobile-sdks/ios-sdk/how-to/offline-signing-pdf).

## Call the eSignature REST API directly

The iOS SDK provides methods that you can use in your app for many common tasks. If you want to incorporate API functionality that hasn’t been implemented as an SDK method, you can call the [eSignature REST API](/docs/esign-rest-api/reference) directly from the SDK. The SDK includes a [module](https://docusign.github.io/native-ios-sdk/documentation/docusignapi/) that enables you to supply parameters to pass in a request to an API endpoint, so you don’t have to build an API definition, methods, and parameters. The SDK also parses the response and returns a JSON object.

For more information about calling the eSignature REST API directly from the SDK, see:

* [How to make a direct API call](/docs/mobile-sdks/ios-sdk/how-to/direct-api-calls) for a walkthrough and sample code
* The [SDK reference](https://docusign.github.io/native-ios-sdk/documentation/docusignapi/)