Unlock This Episode
Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.
We can make all of this much better if we finally take control over our dependency on the file system. In particular, the saving and loading of data to the file system.
Our Dependencies library does not come with such a client immediately available to us, but it is quite easy to create. This will give us a chance to show off how one registers a new dependency with the library so that it is immediately available everywhere via the
@Dependency property wrapper.
Subscribe to Point-Free
Access this episode, plus all past and future episodes when you become a subscriber.
Already a subscriber? Log in
@Dependency(\.speechClient.authorizationStatus)in the standup detail view to show
alert when authorization has been denied.
Further, add an alert button action that uses
@Dependency(\.openURL)to go to the
application notification settings.
@Dependency(\.uuid)to take control of all instances of
UUID()in the application.
Write a test for the record screen that confirms that the timer pauses when the end meeting
alert is presented. Use a test clock to show that when the alert is up, the
state does not change when the clock is advanced. Dismiss the alert, advance the clock, and
assert that the timer continues.
Write a test for the deletion flow of a standup. Start the test off in a state with at least
one standup, and simulate drilling down to the detail, tapping the delete button, assert
that an alert was shown, simulate tapping the confirm deletion button, and then assert that
the screen popped back to the root and the standup was removed from the collection.
Let’s beef up the static
DataManager.mockmethod to support accessing data from more than
one URL in a test. Instead of wrapping a mutable blob of
Data, wrap a
Let’s further beef up the
DataManagerdependency. Define a static
XCTFailby default. Then, define
overridemethods that bypasses failure on a per-URL
Getting started with ScrumdingerApple
Learn the essentials of iOS app development by building a fully functional app using SwiftUI.
Standups AppBrandon Williams & Stephen Celis
A rebuild of Apple’s “Scrumdinger” application that demosntrates how to build a complex, real world application that deals with many forms of navigation (e.g., sheets, drill-downs, alerts), many side effects (timers, speech recognizer, data persistence), and do so in a way that is testable and modular.
CasePathsBrandon Williams & Stephen Celis • Monday Aug 23, 2021
Custom Dump is one of our open source projects. It provides a collection of tools for debugging, diffing, and testing your application’s data structures.
SwiftUI NavigationBrandon Williams & Stephen Celis • Tuesday Sep 7, 2021
A library we open sourced. Tools for making SwiftUI navigation simpler, more ergonomic and more precise.
combine-schedulersBrandon Williams & Stephen Celis • Sunday Jun 14, 2020
An open source library that provides schedulers for making Combine more testable and more versatile.
CasePathsBrandon Williams & Stephen Celis
CasePaths is one of our open source projects for bringing the power and ergonomics of key paths to enums.
ClocksBrandon Williams & Stephen Celis • Wednesday Jun 29, 2022
An open source library of ours. A few clocks that make working with Swift concurrency more testable and more versatile.
DependenciesBrandon Williams & Stephen Celis • Sunday Jan 9, 2022
An open source library of ours. A dependency management library inspired by SwiftUI’s “environment.”
Identified CollectionsBrandon Williams & Stephen Celis • Sunday Jul 11, 2021
Identified Collections is our open source library that provides an ergonomic, performant way to manage collections of identifiable data, and fits in perfectly with SwiftUI.
TaggedBrandon Williams & Stephen Celis • Monday Apr 16, 2018
Tagged is one of our open source projects for expressing a way to distinguish otherwise indistinguishable
types at compile time.
XCTest Dynamic OverlayBrandon Williams & Stephen Celis • Wednesday Mar 17, 2021
XCTest Dynamic Overlay is a library we wrote that lets you write test helpers directly in your application and library code.
Packages authored by Point-FreeSwift Package Index
These packages are available as a package collection, usable in Xcode 13 or the Swift Package Manager 5.5.