Docs
grovs.io Start for free

Quick start

Install and configure the Grovs iOS SDK in your app.

Install the SDK, configure it at launch and open your first link on a device. Takes about ten minutes.

Using an AI coding agent?

Copy one prompt into Claude Code, Cursor or Copilot and it does these steps in your project.

Open in Cursor

Upgrading? See 3.0 to 3.1 or 2.x to 3.0.

Requirements

  • iOS 13.0+
  • Swift 5.9 (Xcode 15+)
  • An app target. App extensions aren't supported.
  • Your bundle ID and Apple App Prefix registered in the Grovs dashboard. See How to Get the Apple App Prefix.

Installation

Swift Package Manager

  1. In Xcode, open File → Add Package Dependencies…
  2. Enter https://github.com/grovs-io/grovs-iOS.git.
  3. Choose Up to Next Major Version from 3.1.0.
  4. Add the Grovs library to your app target.

With a Package.swift:

Swift
dependencies: [
    .package(url: "https://github.com/grovs-io/grovs-iOS.git", from: "3.1.0")
],
targets: [
    .target(
        name: "YourApp",
        dependencies: [.product(name: "Grovs", package: "grovs-iOS")]
    )
]

CocoaPods

Add to your Podfile:

Ruby
pod 'Grovs', '~> 3.1'
Bash
pod install

Configuration

Configure the SDK in application(_:didFinishLaunchingWithOptions:):

Swift
import Grovs
 
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Optional: verbose logging while integrating
    Grovs.setDebug(level: .info)
 
    Grovs.configure(APIKey: "your-api-key", useTestEnvironment: false, delegate: self) { success in
        if success {
            print("Grovs SDK is ready")
        }
    }
 
    // Optional: identify the user (after configure)
    Grovs.userIdentifier = "user_id_from_your_app"
    Grovs.userAttributes = ["name": "John Doe", "plan": "premium"]
 
    return true
}

Set userIdentifier and userAttributes after configure. Earlier values are ignored and the SDK logs an error. A push token set earlier is held until configure runs. See Push Notifications.

Configuration options

Swift
Grovs.configure(
    APIKey: String,
    useTestEnvironment: Bool,
    baseURL: String? = nil,
    autoTrackScreenViews: Bool = true,
    clipboardDomains: [String]? = nil,
    enabled: Bool = true,
    delegate: GrovsDelegate?,
    completion: GrovsBoolCompletion? = nil
)
ParameterDefaultDescription
APIKeyRequiredProject API key from the Grovs dashboard.
useTestEnvironmentRequiredtrue targets the test environment (its own domain, links and data). false targets production. Use true only in development builds.
baseURLGrovs cloudDomain of a self-hosted backend, for example "https://sdk.example.com". 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.
enabledtrueWhether the SDK may collect and send anything this launch. Pass your stored consent value; it isn't persisted. See Privacy & Consent.
delegateRequiredReceives deep link payloads and SDK errors. Held weakly. See Deep Linking.
completionnilCalled on the main thread with whether authentication succeeded. Returns false without authenticating when enabled is false.

Configure once per launch, on the main thread. Calling configure again replaces the previous configuration.

Delegate setup

Apps using 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

Without 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)
}

Call handleAppDelegate methods on the main thread, where UIKit delivers these callbacks. handleSceneDelegate methods work from any thread.

Next steps

See also

Last updated 2026-10-27
Was this page helpful?