# Install iOS Sdk

## 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:

<figure><img src="https://3968724849-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LIFl0DrJkIFDEs_EPBE%2Fuploads%2FtkDBjVH2VSDrTjJnlisW%2Fios-package-manager.gif?alt=media&#x26;token=bebfe53e-1869-4edf-97b2-b1a54f9cf4c5" alt=""><figcaption></figcaption></figure>

1. Navigate to File -> Add Package
2. Enter the URL <https://github.com/growlytics/growlytics-ios-sdk.git>[ ](https://github.com/moengage/MoEngage-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:`.

{% tabs %}
{% tab title="Swift" %}

```swift
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
}
```

{% endtab %}
{% endtabs %}

## Step3: Configure Info.plist

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

<table><thead><tr><th width="250.33333333333331">Key</th><th>Type</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>GROWLYTICS_API_KEY</td><td>STRING</td><td>API - KEY</td><td>GROWLYTICS API KEY</td></tr><tr><td>GROWLYTICS_HOST</td><td>STRING</td><td>PROVIDED BY GROWLYTICS</td><td>ASKS GROWLYTICS SUPPORT TEAM FOR GROWLYTICS_HOST</td></tr><tr><td>GROWLYTICS_DISABLED</td><td>BOOLEAN</td><td>TRUE/FALSE</td><td>Enable/Disable Sdk.</td></tr></tbody></table>

{% hint style="info" %}

#### Congratulations!

You have successfully integrated the Growlytics SDK with your iOS app and are sending user session and [system events](https://docs.webengage.com/docs/ios-tracking-events#section-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.
{% endhint %}

## 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:

{% content-ref url="tracking-events" %}
[tracking-events](https://docs.growlytics.in/integration/ios-sdk/tracking-events)
{% endcontent-ref %}

{% content-ref url="tracking-user" %}
[tracking-user](https://docs.growlytics.in/integration/ios-sdk/tracking-user)
{% endcontent-ref %}
