The next step is to integrate the ASAP SDK with your iOS app.
You can follow either of the following two methods to perform this step.
This method involves use of CocoaPods, a dependency manager that lets you add third-party frameworks and libraries to Xcode projects. For information on how to install CocoaPods, visit this link.
As the first step to integrating the SDK with your app using CocoaPods, you must create a Podfile for your project. If you have not created a Podfile already, perform the following steps:
In Terminal, navigate to the top-level folder of your project (the folder with the xcodeproj file).
$ pod init command.
Then, open the Podfile in Xcode by executing the open -a Xcode Podfile command. The content should look as follows:
# Uncomment this line to define a global platform for your project # platform :ios, '9.0' # Uncomment this line if you're using Swift # use_frameworks! target 'My Sample App' do end
Next, you must add the Zoho Desk Portal SDK to the Podfile and install the SDK in your project. To do this, perform the following steps.
Add the following code to the do block of the Podfile.
target 'My Sample App' do pod 'ZohoDeskPortalSDK', :git => 'https://github.com/zoho/ZohoDeskPortalSDK.git' end
Save the Podfile.
$ pod install command in Terminal.
You have now successfully integrated the SDK with your app using CocoaPods. What this technically means is that your project contains a dependency managed by CocoaPods. So, going forward, you must open your project in Xcode from the .xcworkspace file and not the .xcodeproj file.
For more information on how to use CocoaPods, click here.
Download the zip file of the SDK from this link.
Decompress the zip file and drag and drop the ZohoDeskPortalSDK.framework file to the Embedded Binaries section of your Xcode project bundle.
Then, create a new run script phase from your app target's Build Phases tab.
Paste the following code snippet in the script text field of the run script that appears. (Make sure that this script appears last in the Build Phases tab.)
This script helps overcome a bug related to archiving universal binaries in apps submitted to the App Store. Make sure that the
VALID_ARCHS build setting of your app does not contain
x86_64 in the release configuration.