From 38fd90a18d44251557b5209ab1e21ffc0f2e3b5b Mon Sep 17 00:00:00 2001 From: "mathieu J." Date: Wed, 20 Nov 2024 10:30:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(CrashlyticsKit):=20Add=20Crashlyti?= =?UTF-8?q?csManager=20basic=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Manager/CrashlyticsManager.swift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Modules/CrashlyticsKit/Sources/Manager/CrashlyticsManager.swift b/Modules/CrashlyticsKit/Sources/Manager/CrashlyticsManager.swift index 36224913a5..76d167032e 100644 --- a/Modules/CrashlyticsKit/Sources/Manager/CrashlyticsManager.swift +++ b/Modules/CrashlyticsKit/Sources/Manager/CrashlyticsManager.swift @@ -1,3 +1,23 @@ // Leka - iOS Monorepo // Copyright APF France handicap // SPDX-License-Identifier: Apache-2.0 + +import FirebaseCrashlytics + +public class CrashlyticsManager { + public static func log(message: String) { + Crashlytics.crashlytics().log(message) + } + + public static func setCustomKey(_ key: String, value: Any) { + Crashlytics.crashlytics().setCustomValue(value, forKey: key) + } + + public static func setUserID(_ userID: String) { + Crashlytics.crashlytics().setUserID(userID) + } + + public static func recordError(_ error: Error) { + Crashlytics.crashlytics().record(error: error) + } +}