From 2c0550d48812d8d4845781c4f1699940c2e457a4 Mon Sep 17 00:00:00 2001 From: Dawid Date: Tue, 30 Sep 2025 20:14:45 +0200 Subject: [PATCH] Update Grovs.swift --- Sources/Grovs/Grovs.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/Grovs/Grovs.swift b/Sources/Grovs/Grovs.swift index 2a39578..283b6fa 100644 --- a/Sources/Grovs/Grovs.swift +++ b/Sources/Grovs/Grovs.swift @@ -14,10 +14,12 @@ public protocol GrovsDelegate { /// A class representing Grovs SDK. public class Grovs { + private static var _delegate: GrovsDelegate? /// The delegate to receive callbacks from the SDK. public static var delegate: GrovsDelegate? { set { + _delegate = newValue manager?.delegate = newValue } @@ -30,7 +32,11 @@ public class Grovs { private static var APIKey: String! /// The manager handling Grovs functionality. - private static var manager: GrovsManager? + private static var manager: GrovsManager? { + didSet { + manager?.delegate = _delegate + } + } // MARK: Public methods