How to create a Settings manager in Swift 5.1

Think that you need to work with UserDefaults to save if user is logged in, or if onboarding is already showed. Your code looks like it: let userDefaults = UserDefaults.standard userDefaults.set(logged, forKey: "isLoggedIn") if UserDefaults.standard.bool(forKey: "isLoggedIn") { print("User Logged") } My propose is replace for it: AppSettings[.isLoggedIn] = true if AppSettings.boolValue(.isLoggedIn) { print("User Logged") }... Continue Reading →

How speed up your UI Tests on iOS

If you are writing UI Tests, you may be losing your patience... Wait for finish of all tests can be hard. I decrease my UITests time in 35% , follow all steps: When you run your app, add the argument: let app = XCUIApplication() override func setUp() { super.setUp() continueAfterFailure = false app.launchArguments += ["--Reset"]... Continue Reading →

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑