Initializing the Support SDK (Required)
Initialize the Support SDK in the AppDelegate file when your application is launched.
- A Zendesk admin has registered the app in Zendesk Support. See Registering the application in Zendesk Support in the Support Help Center
- You added the Support SDK to your iOS project. See Adding the Support SDK
Getting the initialization settings
You need the following information to initialize the SDK:
- the URL of your Zendesk Support instance
- your app's id in Zendesk Support
- the client id of your app in Zendesk Support
The settings were generated in Zendesk Support when the Zendesk admin registered your app:
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.
Adding the initialization code
Import the following frameworks into the AppDelegate file in your project.
import ZendeskSDK import ZendeskCoreSDK
@ import ZendeskSDK @ import ZendeskCoreSDK
Paste the following initialization code into the
applicationmethod with the
Zendesk.initialize(appId: "appId", clientId: "clientId", zendeskUrl: "url") Support.initialize(withZendesk: Zendesk.instance)
[ZDKZendesk initializeWithAppId:@"appId" clientId:@"clientId" zendeskUrl:@"url"]; [ZDKSupport initializeWithZendesk:[ZDKZendesk instance]];
Replace the parameter placeholders with your initialization settings.
Note: If you're using multiple brands you can use a brand subdomain rather than the primary subdomain in the
zendeskUrlin the code above.
This initializes the Core SDK and the Support SDK.
The next step is to set an identity. See Setting an identity for more details.