Docs

API Reference

Complete iOS SDK properties and methods reference

Properties

delegate

Swift
Grovs.delegate: GrovsDelegate?

The delegate that receives deep link callbacks from the SDK.

userIdentifier

Swift
Grovs.userIdentifier: String?

Get or set the user identifier. This value appears in the Grovs dashboard and reports. Typically set to your app's user_id.

userAttributes

Swift
Grovs.userAttributes: [String: Any]?

Get or set user attributes. These appear in the Grovs dashboard for user identification and behavior analysis.

pushToken

Swift
Grovs.pushToken: String?

Get or set the push notification token. Used for receiving push notifications for messages sent from the dashboard.


Methods

configure

Swift
Grovs.configure(APIKey: String, useTestEnvironment: Bool, delegate: GrovsDelegate?)

Initialize the SDK with your API key.

setSDK

Swift
Grovs.setSDK(enabled: Bool)

Enable or disable the SDK.

setDebug

Swift
Grovs.setDebug(level: LogLevel)

Set the debug logging level.

Swift
Grovs.generateLink(
    title: String? = nil,
    subtitle: String? = nil,
    imageURL: String? = nil,
    data: [String: Any]? = nil,
    tags: [String]? = nil,
    customRedirects: CustomRedirects? = nil,
    showPreviewiOS: Bool? = nil,
    showPreviewAndroid: Bool? = nil,
    trackingCampaign: String? = nil,
    trackingSource: String? = nil,
    trackingMedium: String? = nil,
    completion: @escaping GrovsURLClosure
)

Generate a smart link with the specified parameters.

lastReceivedPayload

Swift
Grovs.lastReceivedPayload(completion: @escaping GrovsPayloadClosure)

Retrieve the last received deep link payload.

allReceivedPayloadsSinceStartup

Swift
Grovs.allReceivedPayloadsSinceStartup(completion: @escaping GrovsPayloadsClosure)

Retrieve all payloads received since app launch.

handleSceneDelegate (openURLContexts)

Swift
Grovs.handleSceneDelegate(openURLContexts URLContexts: Set<UIOpenURLContext>)

Forward open URL contexts from your SceneDelegate.

handleSceneDelegate (continue)

Swift
Grovs.handleSceneDelegate(continue userActivity: NSUserActivity)

Forward user activity continuation from your SceneDelegate.

handleSceneDelegate (options)

Swift
Grovs.handleSceneDelegate(options connectionOptions: UIScene.ConnectionOptions)

Forward connection options from your SceneDelegate.

handleAppDelegate (continue)

Swift
Grovs.handleAppDelegate(continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool

Forward universal link continuation from your AppDelegate.

handleAppDelegate (open)

Swift
Grovs.handleAppDelegate(open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool

Forward URL opening from your AppDelegate.

displayMessagesViewController

Swift
Grovs.displayMessagesViewController(completion: GrovsEmptyClosure?)

Display the messages list as a modal.

numberOfUnreadMessages

Swift
Grovs.numberOfUnreadMessages(completion: @escaping GrovsIntClosure)

Get the count of unread messages.

linkDetails

Swift
Grovs.linkDetails(path: String, completion: @escaping GrovsLinkClosure)

Get details for a link with the given path.