How to integrate the GC SDK within the iOS app

How to integrate the GC SDK within the iOS app

After setting up the SDK, you need to integrate the ZohoGCSDK within your iOS app.

This can be integrated by the following two ways: 


(i) 
Automated integration using CocoaPods: This method involves the use of CocoaPods (dependency manager) to add third-party frameworks and libraries to Xcode projects.
 

(ii) Manual integration: Integrate ZohoGCSDK manually without any dependency manager.

Automated integration using CocoaPods:

To integrate the SDK into your app, you must create a Podfile for your project in order to use CocoaPods. Follow the below instructions to generate a Podfile if you haven't already.


1. In Terminal, navigate to the top-level folder of your project (the folder with the xcodeproj file).
2. Execute the $ pod init command.
3. Open the Podfile in Xcode by executing the open -a Xcode Podfile command.

The content appears as follows:
# Uncomment this line to define a global platform for your project
# platform :ios, '13.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'My Sample App' do
end
4. If you use Swift, uncomment the use_frameworks!  line.

To install the SDK in your project, you must include the ZohoGCSDK to the Podfile.


Follow these instructions to accomplish this:


1. Include the SDK of your choice in the Podfile. Include the following code in the do block of the Podfile to integrate the ZohoGCSDK. 
  1. target 'My Sample App' do
    pod  'ZohoGCSDK'
    end  
2. Save the Podfile.
3. Execute the $ pod install command in Terminal.

Before installation of CocoaPods, the file will be opened as xcodeproj. After installation, close the xcodeproj file and open the xcworkspace file.

Learn more about CocoaPods: how to install CocoaPods and  how to use CocoaPods

Manual integration:  

To integrate ZohoGCSDK, perform the following steps:

1. Download the SDK of ZohoGCSDK.
2. Decompress the downloaded zip file with .XCFramework extension. 
3. Drag and drop the respective framework file to your Xcode project bundle's Frameworks, Libraries, and Embedded content section.

The ZohoGCSDK is compatible with iOS 13 and all later versions.

Failing to add these keys to the info.plist file will result in app crash at the time of launching the app or when the relevant view controller is presented and Appstore validation may fail.
If you want to integrate the ZohoGCSDK, make sure to add the NSPhotoLibraryUsageDescription, NSCameraUsageDescription, NSLocationAlwaysUsageDescription,NSLocationWhenInUseUsageDescription and NSMicrophoneUsageDescription keys in the info.plist file of your app.