Skip to content

Instantly share code, notes, and snippets.


Addison Francisco slo-addy

  • San Luis Obispo, CA
View GitHub Profile
slo-addy / AlternativeExampleUserNameStorage.swift
Created May 13, 2022 19:03
An alternative example of a simple user name storage using UserDefaults that includes basic tests. This is in reference to
View AlternativeExampleUserNameStorage.swift
import Foundation
protocol CredentialKeeper {
func store(userName: String)
func getUserName() -> String?
class UserCredentialStorage: CredentialKeeper {
var userDefaults: UserDefaults = .standard