Initializing the Unified SDK dependencies (Required)
To use the Unified SDK, you must initialize the product SDKs you want to use. You must complete some prerequisites steps.
- Add the Unified SDK and chosen product SDKs to your iOS project. See Adding the Unified SDK
- In the Zendesk Support admin interface, enable and configure the product SDKs that you want to use. If you don't have admin access, ask a Zendesk admin to do it for you. See Registering the mobile app in Zendesk Support
and Configuring the SDK in Zendesk Support in the Support Help Center
You need the following information to initialize Answer Bot and Support:
- the URL of your Zendesk Support instance
- your app's id in Zendesk Support
- the client id of your app in Zendesk Support
These details are found on the Channels page in Admin Center.
If you have access to Admin Center, sign in and go to Channels > Classic > Mobile SDK. If you don't have admin access, ask a Zendesk admin to get the information for you.
If your organization's Help Center has a host-mapped address, then use the host-mapped URL instead of the Zendesk URL.
Any product SDK should be initialized in the AppDelegate file when your application is launched.
The following example initializes Answer Bot and Support:
Import the following frameworks into the AppDelegate file in your project.
Paste the following initialization code into the
Zendesk.initialize(appId: "appId", clientId: "clientId", zendeskUrl: "url")
AnswerBot.initialize(withZendesk: Zendesk.instance, support: Support.instance!)
[ZDKZendesk initializeWithAppId: @"appId"
[ZDKSupport initializeWithZendesk: [ZDKZendesk instance]];
[ZDKAnswerBot initializeWithZendesk:[ZDKZendesk instance] support:[ZDKSupport instance]];
Replace the parameter placeholders with your initialization details.
This initializes the Support and Answer Bot SDK.
The next step is to set an identity. See Setting an identity for more details.