This repository provides you with demo Apps to help learn how to use Zendesk SDK on iOS.
We hope you'll find those sample Apps useful and encourage you to re-use some of this code in your own Apps.
Please submit a ticket to Zendesk.
Each demo app's instructions are included below.
Each app features two buttons, one to initiliaze Zendesk and another to start & display the conversation. It requires a channel key from your Zendesk account. Instructions on how to get one can be found here. The key must be placed in the "channel_key" variable in the MainViewController.
This app simply features the two buttons described above. If you want to just get a Zendesk SDK conversation going right away, this is the one to start with.
This app features an additional button to authenticate the user with a JWT token. It requires a channel key from your Zendesk account and a service that can generate JWT tokens. For instructions on how to create a JWT authentication service for the iOS SDK, please refer to this guide. Once you have a valid token, it must be provided to the "jwt_token" variable in the MainViewController prior to running the app. The account must be initialized before attempting to log in with the JWT token.
This app allows you to handle a specified URL in a custom way. See the cell.clickHandler closure in the MainViewController, and the messaging function beneath it, for the relevant code. The default behavior is to return false, which will result in a normal browser opening experience. You can set it to return true along with custom code to change the behavior. More information at our documentation here.
This app has an additional button that will display the number of unread messages (i.e. any messages sent by the Zendesk agent while the end user was not in the conversation view). The unread count will also show as badges on the app icon. Note that you must allow the app notification permissions for the unread messages API to work. More information at our documentation here.
This app allows you to send information to the pageView event API, which will appear in the agent's sidebar in the Agent Workspace. See the cell.clickHandler closure within the presentCell function in the MainViewController for the relevant code. More information here.
This app allows you to configure push notifications that can appear when the end user is outside of the app, as well as inside the app but not in the conversation view. The notification banner will take you back to the conversation when tapped. There is an extra "registration" button that must be tapped and the user must allow notification permissions in order for this to work. The code is based on our documentation here. As the documentation suggests, much of the configuration must be done on Apple's end, and requires an Apple developer account. Please ensure that you have a properly configured provisioning profile.
This app allows you to allow values for conversation fields and conversation tags to be set in the SDK to add contextual data about the conversation. This information will show up in the ticket's sidebar, inside the corresponding ticket field and tags list. More information at our documentation here.
Please submit bug reports to Zendesk and be sure to consult our Getting help section of our documentation.