This document pertains explicitly to help widgets created using the updated new ASAP Setup. Please note that if you are using an older version of ASAP, the help widgets will be read-only. To enable the new ASAP widgets on your App, use the latest ASAP iOS SDK 4.0. For older ASAP setups, you can use the ASAP iOS SDK 3.0.16. Please follow either of the following two methods to perform these steps.
I CocoaPods Integration
Add the Zoho Desk Portal SDK to the Podfile and install the SDK in your project.
1. First, include the SDK of your choice in the Podfile.
a. To integrate the ASAP Core SDK (Tickets, Knowledge Base, Community), include the following code in the do block of the Podfile.
- pod 'ZohoDeskPortalCore'
b. To integrate the ASAP Chat Kit SDK(Guided Conversation, Answer Bot, Business Messaging) with the ASAP Core SDK, include the following code in the do block of the Podfile.
- pod 'ZohoDeskPortalCore'
pod 'ZohoDeskPortalCore/ZohoDeskPortalChatKit'
c. To integrate the ASAP SalesIQ SDK(Chat) and ASAP Core SDK, include the following code in the do block of the Podfile.
- pod 'ZohoDeskPortalCore'
pod 'ZohoDeskPortalCore/ZohoDeskPortalSalesIQ'
2. Save the Podfile.
3. Execute the pod install or pod update command in Terminal.
To learn more about CocoaPods, read how to use
CocoaPods.
II Manual Integration
1. Download the SDK of your choice.
a.
ASAP Core SDK (
Tickets,
Knowledge Base,
Community, and
Guided Conversations)
2. Decompress the zip file you downloaded. Next, drag and drop the respective framework file with the extension .
XCFramework to the
Frameworks,
Libraries, and
Embedded Content section of your Xcode project bundle.
If you choose to integrate the ASAP Core SDK, make sure to add the below four keys in the info—plist file of your app.
1 NSPhotoLibraryUsageDescription
2 NSCameraUsageDescription
3 NSMicrophoneUsageDescription
4 NSLocationWhenInUseUsageDescription
How to initialize the SDK on your iOS App
Once the SDK integration is completed, you must initialize the ASAP SDK on your app.
The following three keys are crucial for the initialization:
• Org ID
• App ID
• Data Center
The values of these keys will appear under the Install your widget on a website or mobile app section on the ASAP help widget setup page in Zoho Desk.
To initialize the SDK in your app, perform the following 2 steps:
1. Import the Zoho Desk Portal APIKit framework into the AppDelegate file in your project.
Swift
- import ZohoDeskPortalAPIKit
Objective-C
- @import ZohoDeskPortalAPIKit;
2. Paste the following initialization code into the application method with the didFinishLaunchingWithOptions argument.
Swift
- func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
ZohoDeskPortalKit.initialize(orgID: <#String#>, appID: <#String#>, dataCenter: <#ZDPDataCenter#>)
return true
}
Objective-C
- - (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[ZohoDeskPortalSDK
initializeWithOrgID:<#NSString#>appID:<#NSString#>dataCenter:<
#ZDPDataCenter#>];
return YES;
}
Data Centers (DCs), according to the deployment types:
CN - ZDPDataCenter.CN
EU - ZDPDataCenter.EU
US - ZDPDataCenter.US
IN - ZDPDataCenter.IN
AU - ZDPDataCenter.AU
JP - ZDPDataCenter.JP
SA - ZDPDataCenter.SA
CA - ZDPDataCenter.CA