In order to integrate the SDK, developers need to have the APP key and Workspace ID generated in Step 1. While initializing the SDK in the app, the APP key and Workspace ID need to be passed.
To integrate Datagran into your Xcode project using CocoaPods, follow the below instructions.
**Instructions to set up the pod file:**
1. Open the terminal and install cocoapods using the below command.
**sudo gem install cocoapods**
2. Set your project path on the terminal and init the pod using the below command.
**pod init**
3. Go to your project's pod file and add the pod to install.
**pod 'datagran_iOS_sdk'**
**pod install**
4. Close the Xcode project and open your Project from the terminal using the below command.
**open yourproject.xcworkspace**
Now the integration of the 'datagran_ios_sdk' with the application is complete.
The code below shows a sample call made inside the didFinishLaunchingWithOptions method of a Appdelegate class.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Tracker.shared.initialize("5ea161d978a221ed22861639", showLog: true, addGeo: getGPSStatus(), sendBatch: 20, waitForResponse: 30,workSpaceId: "5e8a03edda47df95e42a0165")
}