Desk360 Docs
Search…
Mobile iOS SDK
Desk360 Mobile iOS SDK helps you embed customer support in your iOS applications with ease.

Features

The Desk360 Mobile SDK for iOS lets customers do any of the following:
    Create new support tickets
    View and comment on existing tickets
    Interactively communicate with related support teams.
The latest version of Mobile iOS SDK is 1.7.0.

Installation

Using CocoaPods

To integrate Desk360 in your Xcode project using CocoaPods, specify it in your Podfile:
1
pod 'Desk360'
Copied!

Usage

You must add your info.plist file.
1
<key>NSPhotoLibraryUsageDescription</key>
2
<string>Allow the app to access your photos.</string>
Copied!
Permission text is optional. You can type whatever you want, but this permission is not optional. If you don't add this permission, Desk360 Images attachment property won't work.
Start Desk360 with appId -and an optional deviceId, an optional language-
1
import Desk360
2
3
let props = Desk360Properties(appID: "1234")
4
// Or if you would like to provide more info here is a full list of the params
5
let props = Desk360Properties(
6
appID: "1234",
7
deviceID: "34567",
8
environment: .production,
9
language: "en",
10
country: "TR",
11
userCredentials: .init(userName: "John Appleased", email: "[email protected]"),
12
bypassCreateTicketIntro: true,
13
jsonInfo: [jsonObject: [String: Any] = ["yourInfoKey": "yourInfoValue"]
14
)
15
Desk360.start(using: props)
Copied!
If no deviceId is provided, Desk360 will use device's UUID, which might cause your app to lose tickets when the application is deleted. If your environment type is production, Desk360 will look at prod url. If no application language is provided, Desk360 will use device's language.
Using Desk360
1
import Desk360
2
3
class ExampleViewController: UIViewController {
4
5
override func viewDidLoad() {
6
super.viewDidLoad()
7
Desk360.show(on: self, animated: true)
8
}
9
10
}
Copied!
Using Optional Notification System
If you need to send a notification when a message is sent to the users, this integration is required.
1
import Desk360
2
3
@UIApplicationMain
4
final class AppDelegate: UIResponder, UIApplicationDelegate {
5
6
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
7
Desk360.setPushToken(deviceToken: deviceToken)
8
}
9
10
}
Copied!
After the above integration, it is sufficient to change the notification certificate settings in the Desk360 admin panel. You can now use notifications
Also if you want notification redirect deeplink system further integration is required.
1
import Desk360
2
3
@UIApplicationMain
4
final class AppDelegate: UIResponder, UIApplicationDelegate {
5
6
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
7
Desk360.setPushToken(deviceToken: deviceToken)
8
}
9
10
}
11
12
// MARK: - UNUserNotificationCenterDelegate
13
extension AppDelegate: UNUserNotificationCenterDelegate {
14
15
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
16
completionHandler([.alert])
17
Desk360.willNotificationPresent(notification.request.content.userInfo)
18
}
19
20
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
21
Desk360.applicationUserInfoChecker(userInfo)
22
}
23
24
@available(iOS 10.0, *)
25
public func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
26
Desk360.applicationUserInfoChecker(response.notification.request.content.userInfo)
27
}
28
}
29
Copied!
When you click on the notification when your application is closed, you need to add this code on the page you want Desk360 to open.
1
import Desk360
2
3
final class YourMainViewController: UIViewController {
4
5
override func viewDidLoad() {
6
super.viewDidLoad()
7
8
Desk360.showWithPushDeeplink(on: self)
9
}
10
11
}
Copied!
Customize Desk360 Theme
You should use Desk360 dashboard for custom config.
For further information, please with contact us [email protected]
Last modified 2mo ago
Copy link