UserManager
public class UserManager : UserManaging
The default implementation of UseManaging
protocol. This class manages users of different UUID()
-
key to store all the onboarded users’ id
Declaration
Swift
public static let onboardedUsersKey: String
-
key to store last onboarded user’s id
Declaration
Swift
public static let lastOnboardedUserKey: String
-
transient user
Declaration
Swift
public static var transientUser: User?
-
variable to capture user mode of the application
Declaration
Swift
public static var userMode: ApplicationUserMode { get set }
-
Observers registered for user events
Declaration
Swift
public static var userEventObservers: [UserEventObserving] { get }
-
enum to define user modes of the apllication
See moreDeclaration
Swift
public enum ApplicationUserMode : Equatable
-
Undocumented
Declaration
Swift
public init()
-
Declaration
Swift
public func get(forKey onboardingID: UUID) -> User?
-
Declaration
Swift
public func put(onboardedUser: User?, forKey onboardingID: UUID)
-
Declaration
Swift
public func delete(forKey onboardingID: UUID)
-
Declaration
Swift
public func getUsers(isActive: Bool = false) -> [User]
-
Declaration
Swift
public func getCurrentUser() -> UUID?
-
Declaration
Swift
public func setCurrentUser(onboardingID: UUID)
-
Identify the User from the store of successfully onboarded Users
Parameters
user
a User type, which is to be identified in the store
Return Value
true and the User object from store or false and nil if the User does not exist in the store
-
Registers the given user event observer.
Declaration
Swift
public static func register(_ userEventObserver: UserEventObserving)
Parameters
userEventObserver
the observer to be registered
-
Unregisters the given user event observer.
Declaration
Swift
public static func unregister(_ userEventObserver: UserEventObserving)
Parameters
userEventObserver
the observer to be removed