From beeee96bf0fc6927f993d16ed9ba8e44b64f0cbb Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 28 Mar 2019 17:24:08 -0300 Subject: [PATCH] Use a siglneton through a public static and hide the initializer --- glean-core/ios/Glean/Glean.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/glean-core/ios/Glean/Glean.swift b/glean-core/ios/Glean/Glean.swift index bc254a27d..7e9e2772e 100644 --- a/glean-core/ios/Glean/Glean.swift +++ b/glean-core/ios/Glean/Glean.swift @@ -8,9 +8,11 @@ import Foundation -open class Glean { +public class Glean { + public static let shared = Glean() + private var initialized: Bool = false - public init() { + private init() { self.initialized = true }