Docs

Quick Start

Install and configure the Grovs iOS SDK in your app

Upgrading from 2.x? See the 3.0 upgrade guide.

Installation

Swift Package Manager

  1. In Xcode, go to File → Swift Packages → Add Package Dependency
  2. Enter the repository URL: https://github.com/grovs-io/grovs-iOS.git
  3. Select the version range that fits your project
  4. Click Next, then Finish

CocoaPods

Add the pod to your Podfile:

Ruby
pod 'Grovs'

Then run:

Bash
pod install

Configuration

Import the module and initialize the SDK in your AppDelegate:

Swift
import Grovs
 
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    Grovs.configure(APIKey: "your-api-key", useTestEnvironment: false, delegate: self) { success in
        if success {
            print("Grovs SDK is ready")
        }
    }
 
    // Optional: point to a self-hosted backend (domain only, the SDK appends the API path)
    // Grovs.configure(APIKey: "your-api-key", useTestEnvironment: false, baseURL: "https://your-domain.com", delegate: self)
 
    // Optional: turn off automatic screen tracking (on by default)
    // Grovs.configure(APIKey: "your-api-key", useTestEnvironment: false, autoTrackScreenViews: false, delegate: self)
 
    // Optional: enable debug logging
    Grovs.setDebug(level: .info)
 
    // Optional: set user identity
    Grovs.userIdentifier = "user_id_from_your_app"
    Grovs.userAttributes = ["name": "John Doe", "plan": "premium"]
 
    return true
}

Configuration options

ParameterDefaultDescription
APIKeyYour project API key from the Grovs dashboard.
useTestEnvironmentWhen true, the SDK operates in test mode.
baseURLGrovs cloudDomain for a self-hosted backend. The SDK appends the API path.
autoTrackScreenViewstrueTrack screen views automatically. See Events & Screen Tracking.
clipboardDomainsnoneExtra link hosts accepted by clipboard-assisted deferred deep linking. Grovs-owned hosts are always accepted.
delegateReceives deep link payloads and SDK errors.
completionCalled on the main thread with whether authentication succeeded.

Delegate setup

Apps using SceneDelegate

If your app uses a SceneDelegate, forward these calls to the SDK:

Swift
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
    Grovs.handleSceneDelegate(openURLContexts: URLContexts)
}
 
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
    Grovs.handleSceneDelegate(continue: userActivity)
}
 
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    Grovs.handleSceneDelegate(options: connectionOptions)
}

Apps using AppDelegate only

If your app does not use a SceneDelegate, forward these calls instead:

Swift
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    return Grovs.handleAppDelegate(continue: userActivity, restorationHandler: restorationHandler)
}
 
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
    return Grovs.handleAppDelegate(open: url, options: options)
}

Next steps

See also

Edit this page on GitHubLast updated 2026-09-03