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
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 Mobile SDK admin page in Zendesk Support.
If you have admin access to Zendesk Support, sign in and go to Admin > 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.