SignInManager

public class SignInManager : NSObject
  • These must be stored in user defaults– so that if they delete the app, we lose it, and can start again. Storing both the currentUIDisplayName and userId because the userId (at least for Google) is just a number and not intelligible in the UI.

    Declaration

    Swift

    public static var currentUIDisplayName: SMPersistItemString
  • Declaration

    Swift

    public static var currentUserId: SMPersistItemString
  • Declaration

    Swift

    public static let session: SignInManager
  • Declaration

    Swift

    public var signInStateChanged: TargetsAndSelectors
  • Declaration

    Swift

    public fileprivate(set) var lastStateChangeSignedUserIn: Bool
  • Declaration

    Swift

    public func getSignIns(for userType: UserType?) -> [GenericSignIn]
  • Set this to establish the current SignIn mechanism in use in the app.

    Declaration

    Swift

    public var currentSignIn: GenericSignIn? { get set }
  • A shorthand– because it’s often used.

    Declaration

    Swift

    public var userIsSignedIn: Bool { get }
  • At launch, you must set up all the SignIn’s that you’ll be presenting to the user. This will call their appLaunchSetup method.

    Declaration

    Swift

    public func addSignIn(_ signIn: GenericSignIn, launchOptions options: [UIApplicationLaunchOptionsKey : Any]?)
  • Based on the currently active signin method, this will call the corresponding method on that class.

    Declaration

    Swift

    public func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool