Tutorials › Launch Lab Notes › Chapter 27

The Entries Ahead

LabChapter 27 of the Launch Lab Notes22 minAugust 20, 2026Intermediate

A widget is not one view. It is a face plus the entries ahead.

This bench draws both. AT END is the control — after the last entry the face goes STALE. AFTER DATE keeps a RELOAD chip so getTimeline can run again.

Filmstrip: playhead walks t+0h…t+3h; AT END goes STALE while AFTER DATE shows RELOAD then a new wave.

Entry 0 — same face, different futures

-mode e0

PLAYHEAD entry 0 wave 0. Both faces HARBOR build 400 t+0h. AT END strip ends END. AFTER DATE strip ends RELOAD.

Both faces show build 400 · t+0h. The strip already disagrees on what happens after t+3h: END vs RELOAD.

Entry 2 — playhead mid-strip

-mode e2

PLAYHEAD entry 2. Both faces build 410 t+2h. Strip highlights t+2h / 410. END vs RELOAD still waiting.
SlotBuilds
t+0h400
t+1h405
t+2h410 ← playhead
t+3h415

Policies still look identical on the face. The lie (or the freeze) is still ahead.

Past end — STALE vs RELOAD

-mode stale

PLAYHEAD past end wave 0. AT END face STALE build 415 t+3h, END STALE chip. AFTER DATE face RELOAD getTimeline, RELOAD NOW chip.
PolicyFaceStrip tail
AT END (control)STALE · build 415 · t+3hEND STALE
AFTER DATERELOAD · getTimelineRELOAD NOW

.atEnd keeps showing the last entry forever. .after(date) is a request for a new timeline.

Reload wave — provider asked again

-mode reload (wave 1)

wave 1 pinned past end. Entries 420 425 430 435. AT END STALE build 435. AFTER DATE RELOAD getTimeline.

New strip: 420 · 425 · 430 · 435. AT END is stale on 435. AFTER DATE is still the reload face — the policy that made wave 1 possible.

Filmstrip = getTimeline return value

WidgetKit asks for [TimelineEntry]. Drawing them as cells is the same array, photographed. The reload policy is not an entry — it is what happens when time walks off the end of that array.

Mini-exercise

Add a fifth entry at t+4h. Confirm AT END’s STALE moment moves one cell right.

Challenges

  1. Wire a real WidgetKit extension that shares HarborTimeline.Entry with this bench.
  2. Show .after(Date) with an absolute clock under the RELOAD chip.
  3. Add a third column for TimelineReloadPolicy never / background refresh only.
  4. Animate the playhead with TimelineView instead of asyncAfter.
  5. XCUITest: assert STALE appears under -mode stale and not under -mode e2.

Key Points

Next up: Sorting, visualised — three sorts racing on the same array with comparison counts.

SwiftUI
SwiftUI tutorials for building native app screens, layouts, navigation, and state-driven interfaces.
Swift
Swift fundamentals for app developers who want to understand the language behind real iOS and macOS apps.
Ship iOS
Shipping workflows for iOS apps.
📚 Go deeper with LIPAI WANG’s hands-on Udemy bootcampsBrowse all courses →
← Ch 26: Same Numbers, Two StoriesCh 28: Three Sorts, One Array→
SwiftUIUltimate SwiftUI SeriesSwiftUI tutorials for building native app screens, layouts, navigation, and state-driven interfaces.SwiftUltimate Swift SeriesSwift fundamentals for app developers who want to understand the language behind real iOS and macOS apps.Ship iOSShip iOS Apps SeriesShipping workflows for iOS apps: signing, TestFlight, App Store Connect, CI, and release hygiene.

Ship your apps faster

When you're ready to publish your Swift app to the App Store, Simple App Shipper handles metadata, screenshots, TestFlight, and submissions — all in one place.

Try Simple App Shipper
5 free articles remainingSubscribe for unlimited access