Install iOS Sdk

This page will give detailed description of how you can integrate Growlytics iOS SDK to your native iOS app.

Step1: Install SDK - With Swift Package Manager

The easiest way to use Growlytics in your iOS project is with Swift Package Manager.

Swift Package Manager (SPM) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To install the Growlytics iOS SDK with Swift Package Manager, follow the below steps:

  1. Navigate to File -> Add Package

  2. Enter the URL https://github.com/growlytics/growlytics-ios-sdk.git and select the branch as main or required version to install the package.

  3. Click on Add Package.

  4. Now, growlytics-ios-sdk is installed.

Step2: Initialize SDK

Step 1: Call Growlytics application:didFinishLaunchingWithOptions: from the application:didFinishLaunchingWithOptions: of your AppDelegate.

  • We recommended that you make this call at the end of didFinishLaunchingWithOptions:.

import Growlytics

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
                
        /**
          YOUR CODE GOES HERE
        **/
                
        LifeCycleCallback.shared.register(application: application)
        
        return true
}

Step3: Configure Info.plist

Add the following properties to the Info.plist file of your project.

Congratulations!

You have successfully integrated the Growlytics SDK with your iOS app and are sending user session and system events data to your Growlytics account. Please note that it may take a up to few minutes for your data to reflect on your dashboard.

What Next?

With Step3, Growlytics SDK integration is finished.

We recommend that you implement the following integrations before releasing your app with Growlytics SDK for the first time:

Last updated