# 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="/files/9QXIInBpcm1ijzJ32mYS" 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="/pages/-M2JAE4XByndgmtFGdMy" %}
[Tracking Events](/integration/ios-sdk/tracking-events.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M2IyQJbSZi\_-pLvd3we" %}
[Tracking User](/integration/ios-sdk/tracking-user.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.growlytics.in/integration/ios-sdk/install-ios-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
