After successfully setting up the ASAP SDK on your iOS application, the next step is to integrate it.
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, and Guided Conversations), include the following code in the do block of the Podfile.
- pod 'ZohoDeskPortalCore'
b. To integrate the ASAP Services SDK (Tickets, Knowledge Base, Community, Guided Conversations, and Chat), include the following code in the do block of the Podfile.
- pod 'ZohoDeskPortalServices'
2. Save the Podfile.
3. Execute the pod install or pod update command in Terminal.
![](https://static.zohocdn.com/zoho-desk-editor/static/images/file.png)
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.
![](https://static.zohocdn.com/zoho-desk-editor/static/images/exclamation.png)
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 Code Snippet section on the setup page of the ASAP help widget in Zoho Desk.
To initialize the SDK in your app, perform the following 2 steps:
1. Import the Zoho Desk Portal SDK 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
{
ZohoDeskPortalSDK.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;
}
![](https://static.zohocdn.com/zoho-desk-editor/static/images/file.png)
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