iOS Integration Description
Sobot provides the enterprises with a full set of perfect intelligent agent solutions. Sobot ticket SDK provides support for all tickets and allows enterprises to complete a series of ticket operations with the accounts they used. Sobot SDK has the following features:- Provide a complete process of login - use - logout.
- Consist of two login modules: external login with synchronized token and regular login with username and password.
- Support basic functions such as ticket query, operation, and creation.
Related limits and notes :
- iOS SDK new version supports versions above iOS9, iPhone, and iPad, and supports both portrait mode and landscape mode.
- iOS currently only supports hyperlink tags and does not recognize other Html tags and attributes.
- iOS requires camera and photo permissions; otherwise, some functions are not available.
Schematic Diagram of Integration Process
File Description
SDK files include (SobotOrder.framework, SobotCommon.framework and SobotOrder.bundle), SobotDemo, and Doc related documentation. | File| Description| |:----------|:----------|:----------|:----------| | SobotOrder.framework| Sobot ticket SDK code library| | SobotCommon.framework| Sobot code basic dependency library| | SobotOrder.bundle| SDK resource library, containing image files, multilingual files and colors| | SobotOrderApi.h| The file provides an access function| | SobotKitConfig.h| Basic UI configuration param class| | SobotCacheEntity.h| Basic function param class (color, language, display mode, etc.)| | SobotOrderHomeController| Ticket entry interface| | SobotOrderClient.h| Basic function|Integration Method
Manual Integration
Download link: iOS_OrderSDK Unzip [iOS_SDK] and add necessary files SobotOrder.framework, SobotCommon.framework and SobotOrder.bundle to your project.CocoaPods Integration
Add in podfile:Quick start
step1 Domain name description
- If you use localized deployment, please use your deployed server domain name.
step2 Initialization param and call method
Initialization param and call method: Initialize information SobotCacheEntity; set the function related attributes; the initialization method is executed locally, with no asynchronous requests generated, and it takes effect immediately after setting. The main call code is as follows: [Note: Before initiating Sobot ticket SDK, call the initialization API initWithHost; otherwise, the SDK cannot be initiated] The method is as follows:| Param | Type | Required | Description |
|---|---|---|---|
| config | NSObject | Yes | Basic software configuration, operating normally only after being designated |
| host | NSString | No | It’s Alibaba Cloud domain name by default. If you want to use other domain names, you need to designate it. |
| kitInfo | NSObject | Yes | UI related configuration |
| resultBlock | Block | No | Initialization status callback, code=1: succeed |
step3 Initiate Ticket Homepage
| Param | Type | Required | Description |
|---|---|---|---|
| account | NSString | Yes | Agent account |
| loginPwd | NSString | Yes | Agent account password |
| vc | UIViewController | Yes | VC for executing jump |
| resultBlock | Block | No | Execution result, code=1: succeed |
Function Description
Permission Setting
Permissions to be addedInitiate Sobot Page
1. Initiate Ticket Homepage
Method 1 : Directly use the method we provide to automatically log in and jump to the page. The method is as follows:| Param | Type | Required | Description |
|---|---|---|---|
| account | NSString | Yes | Agent account |
| loginPwd | NSString | Yes | Agent account password |
| vc | UIViewController | Yes | VC for executing jump |
| resultBlock | Block | No | Execution result, code=1: succeed |
| Param | Type | Required | Description |
|---|---|---|---|
| account | NSString | Yes | Agent account |
| loginPwd | NSString | No | Agent account password, used only when token is null |
| token | NSString | No | Logged-in token, not required when there is a password |
| vc | UIViewController | Yes | VC for executing jump |
| resultBlock | Block | No | Execution result, code=1: succeed |
2. Initiate Ticket Details
[Note: Before performing the operation, you need to ensure that you have logged in] The method is as follows:| Param | Type | Required | Description |
|---|---|---|---|
| ticketId | NSString | Yes | Ticket ID |
| vc | UIViewController | Yes | VC for executing jump |
| resultBlock | Block | No | Execution result, code=1: succeed. Automatically jump after success |
3. Initiate the Create Ticket Page
[Note: Before performing the operation, you need to ensure that you have logged in.] The method is as follows:| Param | Type | Required | Description |
|---|---|---|---|
| params | NSDictionary | No | Customer info, not required. When it is designated, the Create Ticket page does not need to select the corresponding customer. |
| vc | UIViewController | Yes | VC for executing jump |
| resultBlock | Block | No | Execution result, code=1: succeed. Automatically jump after success |
Login
Logout
Set Debug Mode
Configuration Class Attribute Description
● SobotKitConfig Class Description
The configuration takes effect immediately. Configure with the following functions in SobotOrderApi.h, and overwrite the previous set value after the initialization and direct configuration;| Param | Type | Required | Description |
|---|---|---|---|
| isShowExitAlterView | BOOL | No | Whether to show the logout pop-up when login fails. NO (not enable) by default. |
● SobotCacheEntity Class Description
This attribute must be configured at initialization, and can be configured once without repeating the configuration.| Param | Type | Required | Description |
|---|---|---|---|
| themeMode | NSInteger | No | Display mode. 0: Follow the system, 1: Dark, 2: Light. |
| bundleName | NSString | No | Resource name, SobotOrder by default. |
| languagePathInBundle | NSString | No | International file path in bundle, with a fixed value of Localizable. |
| languageTableName | NSString | No | International file name in bundle, with a fixed value of SobotLocal. |
| colorTableName | NSString | No | Color file name in bundle, with a fixed value of SobotColor. |
| absoluetelanguage | NSString | No | Designated language, following the system by default. |