krz/daybyday

iOS learning games for young children: days, months, seasons, numbers, letters, animals and more. education ios kids swift https://krz.sh/apps/daybyday/

Commit 4c57ed8193

4c57ed8193bb19cebde90bb3461f327efd83f768

parent: 9c8e405749

Unsigned

cmc <hello@cleberg.net> · 2026-10-17 22:01 UTC

App Store screenshots, release script and 2.0 notes (!12)

Follows orgstar's process.

- `ScreenshotScene` (Debug only): `-screenshot <name>` opens one screen on an in-memory store with a demo child (Olive): home, routine, animals, train, trace, counting, calendar, progress. Release builds are unchanged.
- `scripts/take-screenshots.sh [scene ...]`: builds Debug, then on the iPhone 18 Pro Max and iPad Pro 13-inch (M5) simulators sets light mode and a 9:41 full status bar, launches each scene, retakes any blank frame, and flattens to RGB. The 6.3" set is resized from the 6.9" one. Output in `AppStore/screenshots/{iphone-6.9,iphone-6.3,ipad}` (1320x2868, 1206x2622, 2064x2752).
- `scripts/release-ios.sh`: archives with automatic signing through the Apple ID in Xcode and uploads to App Store Connect for TestFlight, from a clean `main`. Version from `MARKETING_VERSION`, build number from the commit count. `DAYBYDAY_PUBLISH=0` exports the `.ipa` only; checked here (1.3.3, build 23, signed export).
- `MARKETING_VERSION` 2.0; `AppStore/whats-new.md` holds the release notes.
- `.gitignore` for `.build/`, `.superpowers/`, `__pycache__/` and `xcuserdata/`; the tracked Xcode user state is removed from the index so the release script's clean-tree check passes.

The old `Screenshots/iphone.png` and `ipad.png` (1.3.x, with alpha) are left in place.

Tests: 228 pass.

Closes #11

Layout: unified · split

.gitignore added +4
@@ -0,0 +1,4 @@
1.build/
2.superpowers/
3__pycache__/
4xcuserdata/
AppStore/screenshots/ipad/01-home.png added

Binary file not shown.

AppStore/screenshots/ipad/02-routine.png added

Binary file not shown.

AppStore/screenshots/ipad/03-animals.png added

Binary file not shown.

AppStore/screenshots/ipad/04-train.png added

Binary file not shown.

AppStore/screenshots/ipad/05-trace.png added

Binary file not shown.

AppStore/screenshots/ipad/06-counting.png added

Binary file not shown.

AppStore/screenshots/ipad/07-calendar.png added

Binary file not shown.

AppStore/screenshots/ipad/08-progress.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/01-home.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/02-routine.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/03-animals.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/04-train.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/05-trace.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/06-counting.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/07-calendar.png added

Binary file not shown.

AppStore/screenshots/iphone-6.3/08-progress.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/01-home.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/02-routine.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/03-animals.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/04-train.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/05-trace.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/06-counting.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/07-calendar.png added

Binary file not shown.

AppStore/screenshots/iphone-6.9/08-progress.png added

Binary file not shown.

AppStore/whats-new.md added +17
@@ -0,0 +1,17 @@
1# What's New
2
3## 2.0
4
5DayByDay now turns every topic into games.
6
7- Games in every topic: Find it!, odd one out, and listen-and-pick, with cheers for right answers and a gentle hint for wrong ones.
8- Order and counting: put the week train in order, spin the year wheel, sort yesterday, today and tomorrow, count objects and find the bigger pile.
9- Richer cards: animal sounds and facts, letter sounds with an example word, tracing letters and shapes, mixing colors, dressing for the weather, shaking the device to make it rain, sorting fruit and vegetables, and movement prompts like "Touch your nose!".
10- A daily Today routine: hear the day, month and season, pick today's weather, and add a sticker to the calendar.
11- A friendly owl who asks the questions and cheers your child on.
12- A profile for each child, with their own stickers, birthday and day pictures such as swim day or grandma day.
13- Practice adapts: anything a child misses comes up more often until they know it.
14- A Grown-Ups area behind a parent gate shows what each child knows and what they are still mixing up.
15- A new recorded voice for every word and prompt, so it sounds the same on every device.
16
17Everything stays on the device: no accounts, ads, tracking or internet connection.
DayByDay.xcodeproj/project.pbxproj +2 −2
@@ -460,7 +460,7 @@
460 "$(inherited)", 460 "$(inherited)",
461 "@executable_path/Frameworks", 461 "@executable_path/Frameworks",
462 ); 462 );
463 MARKETING_VERSION = 1.3.3; 463 MARKETING_VERSION = 2.0;
464 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay; 464 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay;
465 PRODUCT_NAME = "$(TARGET_NAME)"; 465 PRODUCT_NAME = "$(TARGET_NAME)";
466 STRING_CATALOG_GENERATE_SYMBOLS = YES; 466 STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -494,7 +494,7 @@
494 "$(inherited)", 494 "$(inherited)",
495 "@executable_path/Frameworks", 495 "@executable_path/Frameworks",
496 ); 496 );
497 MARKETING_VERSION = 1.3.3; 497 MARKETING_VERSION = 2.0;
498 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay; 498 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay;
499 PRODUCT_NAME = "$(TARGET_NAME)"; 499 PRODUCT_NAME = "$(TARGET_NAME)";
500 STRING_CATALOG_GENERATE_SYMBOLS = YES; 500 STRING_CATALOG_GENERATE_SYMBOLS = YES;
DayByDay.xcodeproj/project.xcworkspace/xcuserdata/cmc.xcuserdatad/UserInterfaceState.xcuserstate deleted

Binary file not shown.

DayByDay/DayByDayApp.swift +28 −3
@@ -11,11 +11,23 @@ import SwiftUI
11 11
12@main 12@main
13struct DayByDayApp: App { 13struct DayByDayApp: App {
14 private let container = ProfileStore.makeContainer(inMemory: false) 14 #if DEBUG
15 private let screenshot = ScreenshotScene.requested
16 #endif
17 private let container: ModelContainer
15 @State private var session: ProfileSession 18 @State private var session: ProfileSession
16 19
17 init() { 20 init() {
18 _session = State(initialValue: ProfileSession(store: ProfileStore(context: container.mainContext))) 21 #if DEBUG
22 container = ProfileStore.makeContainer(inMemory: screenshot != nil)
23 #else
24 container = ProfileStore.makeContainer(inMemory: false)
25 #endif
26 let session = ProfileSession(store: ProfileStore(context: container.mainContext))
27 #if DEBUG
28 if screenshot != nil { ScreenshotScene.seed(session) }
29 #endif
30 _session = State(initialValue: session)
19 31
20 Task.detached(priority: .background) { 32 Task.detached(priority: .background) {
21 // Activate the audio session early so the first real tap doesn't block. 33 // Activate the audio session early so the first real tap doesn't block.
@@ -34,9 +46,22 @@ struct DayByDayApp: App {
34 46
35 var body: some Scene { 47 var body: some Scene {
36 WindowGroup { 48 WindowGroup {
37 ContentView() 49 root
38 .environment(session) 50 .environment(session)
39 .modelContainer(container) 51 .modelContainer(container)
40 } 52 }
41 } 53 }
54
55 @ViewBuilder @MainActor
56 private var root: some View {
57 #if DEBUG
58 if let screenshot {
59 screenshot.view(session)
60 } else {
61 ContentView()
62 }
63 #else
64 ContentView()
65 #endif
66 }
42} 67}
DayByDay/Screenshots/ScreenshotScene.swift added +91
@@ -0,0 +1,91 @@
1//
2// ScreenshotScene.swift
3// DayByDay
4//
5
6#if DEBUG
7import SwiftUI
8
9/// App Store screens, opened by `scripts/take-screenshots.sh` with
10/// `-screenshot <name>`. The app then runs on an in-memory store seeded with
11/// one demo child.
12enum ScreenshotScene: String, CaseIterable {
13 case home, routine, animals, train, trace, counting, calendar, progress
14
15 static var requested: ScreenshotScene? {
16 let args = ProcessInfo.processInfo.arguments
17 guard let i = args.firstIndex(of: "-screenshot"), i + 1 < args.count else { return nil }
18 return ScreenshotScene(rawValue: args[i + 1])
19 }
20
21 @ViewBuilder @MainActor
22 func view(_ session: ProfileSession) -> some View {
23 switch self {
24 case .home:
25 ContentView()
26 case .routine:
27 NavigationStack { TodayRoutineView().navigationTitle(Category.today.label) }
28 case .animals:
29 NavigationStack { Category.animals.lookAndListenView.navigationTitle(Category.animals.label) }
30 case .train:
31 NavigationStack {
32 SequencePuzzleView(game: .weekTrain) {
33 var rng = SystemRandomNumberGenerator()
34 var train = SequencePuzzle.weekTrain(using: &rng)
35 _ = train.place(Category.days.item(DayOfWeek.sunday))
36 return train
37 }
38 .navigationTitle(Game.weekTrain.title)
39 }
40 case .trace:
41 NavigationStack { GameDestination(category: .alphabet, game: .trace) }
42 case .counting:
43 NavigationStack { GameDestination(category: .numbers, game: .counting) }
44 case .calendar:
45 NavigationStack {
46 ScrollView { StickerCalendarView(profile: session.current).frame(maxWidth: 560).padding() }
47 .navigationTitle("Stickers")
48 }
49 case .progress:
50 NavigationStack {
51 if let profile = session.current { ChildProgressView(profile: profile) }
52 }
53 }
54 }
55
56 /// One child with a birthday this month, a day picture today, stickers on
57 /// earlier days this month, and answers that leave a few months to practice.
58 @MainActor
59 static func seed(_ session: ProfileSession, calendar: Calendar = AppCalendar.current, now: Date = .now) {
60 let today = calendar.dateComponents([.year, .month, .day], from: now)
61 guard let olive = try? session.store.create(name: "Olive", avatar: .hare, color: .teal,
62 birthday: (month: today.month!, day: today.day! == 28 ? 27 : 28)) else { return }
63 session.store.setPicture(.swim, on: .current, for: olive)
64 let weathers: [LearnWeather] = [.sunny, .cloudy, .rainy, .sunny, .windy, .snowy, .sunny]
65 for (i, day) in (1..<today.day!).reversed().prefix(10).enumerated() {
66 session.store.addSticker(for: olive, on: DateComponents(year: today.year, month: today.month, day: day),
67 weather: weathers[i % weathers.count])
68 }
69 let days = Category.days.quizItems, months = Category.months.quizItems
70 let t = now.addingTimeInterval(-86_400)
71 for (i, day) in days.enumerated() {
72 session.store.record(day, correct: true, for: olive, at: t + Double(i) * 300)
73 session.store.record(day, correct: true, for: olive, at: t + 5000 + Double(i) * 300)
74 }
75 for (i, month) in months.enumerated() where i < 5 {
76 session.store.record(month, correct: true, for: olive, at: t + Double(i) * 300)
77 session.store.record(month, correct: true, for: olive, at: t + 5000 + Double(i) * 300)
78 }
79 for month in months[5...7] { session.store.record(month, correct: false, for: olive, at: t + 9000) }
80 for category in [Category.numbers, .colors, .shapes, .seasons] {
81 for (i, item) in category.quizItems.enumerated() {
82 session.store.record(item, correct: true, for: olive, at: t + Double(i) * 60)
83 session.store.record(item, correct: true, for: olive, at: t + 5000 + Double(i) * 60)
84 }
85 }
86 session.store.record(Category.shapes.quizItems[0], correct: false, for: olive, at: t + 9000)
87 session.profilesChanged()
88 session.select(olive)
89 }
90}
91#endif
README.org +11
@@ -15,5 +15,16 @@ as large cards. tap a card to hear it read aloud.
15ios 26 or later. for better audio, download an enhanced voice under 15ios 26 or later. for better audio, download an enhanced voice under
16Settings > Accessibility > Read & Speak > Voices. 16Settings > Accessibility > Read & Speak > Voices.
17 17
18* release
19=scripts/take-screenshots.sh= retakes =AppStore/screenshots= on the iPhone 18 Pro Max
20and iPad Pro 13-inch (M5) simulators; the 6.3" set is resized from the 6.9" one.
21
22=scripts/release-ios.sh= archives the app and uploads it to App Store Connect for
23TestFlight, from a clean =main=, signed through the Apple ID in Xcode (Xcode >
24Settings > Accounts). The version is =MARKETING_VERSION=; the build number is the
25commit count, so each upload needs a new commit. =DAYBYDAY_PUBLISH=0= exports the
26=.ipa= to =.build/ios-release= without uploading. Release notes are in
27=AppStore/whats-new.md=.
28
18* license 29* license
190bsd. see LICENSE. 300bsd. see LICENSE.
scripts/release-ios.sh added +62
@@ -0,0 +1,62 @@
1#!/bin/sh
2# Archives DayByDay and uploads it to App Store Connect for TestFlight, signed automatically with
3# the team's distribution certificate through the Apple ID signed in to Xcode. The version is the
4# project's MARKETING_VERSION; the build number is the commit count.
5# Usage: scripts/release-ios.sh
6# DAYBYDAY_PUBLISH 0 archives and exports the .ipa to .build/ios-release without uploading
7set -eu
8
9cd "$(dirname "$0")/.."
10publish="${DAYBYDAY_PUBLISH:-1}"
11team=ZCNAX3VL9D
12project=DayByDay.xcodeproj
13
14if [ "$publish" != 0 ]; then
15 [ -z "$(git status --porcelain)" ] || { echo "The working tree has changes." >&2; exit 1; }
16 [ "$(git branch --show-current)" = main ] || { echo "Release from main." >&2; exit 1; }
17fi
18
19version="$(sed -n 's/.*MARKETING_VERSION = \(.*\);/\1/p' "$project/project.pbxproj" | sort -u)"
20[ "$(printf '%s\n' "$version" | wc -l | tr -d ' ')" = 1 ] || { echo "The targets' MARKETING_VERSION differ: $version" >&2; exit 1; }
21build="$(git rev-list --count HEAD)"
22
23out=.build/ios-release
24rm -rf "${out:?}"
25mkdir -p "$out"
26archive="$out/DayByDay.xcarchive"
27# xcodebuild rewrites the project file in its own key order; the copy puts it back as it was.
28cp "$project/project.pbxproj" "$out/project.pbxproj"
29trap 'cp "$out/project.pbxproj" "$project/project.pbxproj"' EXIT
30xcodebuild archive -project "$project" -scheme DayByDay -configuration Release \
31 -destination 'generic/platform=iOS' -archivePath "$archive" -allowProvisioningUpdates -quiet \
32 CURRENT_PROJECT_VERSION="$build"
33
34if [ "$publish" = 0 ]; then destination=export; else destination=upload; fi
35cat > "$out/ExportOptions.plist" <<PLIST
36<?xml version="1.0" encoding="UTF-8"?>
37<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
38<plist version="1.0">
39<dict>
40 <key>method</key>
41 <string>app-store-connect</string>
42 <key>destination</key>
43 <string>$destination</string>
44 <key>teamID</key>
45 <string>$team</string>
46 <key>signingStyle</key>
47 <string>automatic</string>
48 <key>manageAppVersionAndBuildNumber</key>
49 <false/>
50 <key>uploadSymbols</key>
51 <true/>
52</dict>
53</plist>
54PLIST
55xcodebuild -exportArchive -archivePath "$archive" -exportOptionsPlist "$out/ExportOptions.plist" \
56 -exportPath "$out/export" -allowProvisioningUpdates -quiet
57
58if [ "$publish" = 0 ]; then
59 echo "Exported $(ls "$out"/export/*.ipa): $version ($build), not uploaded"
60else
61 echo "Uploaded DayByDay $version ($build) to App Store Connect; it shows in TestFlight once processed"
62fi
scripts/take-screenshots.sh added +69
@@ -0,0 +1,69 @@
1#!/bin/sh
2# Takes the App Store screenshots on the iPhone 18 Pro Max (6.9") and iPad Pro 13-inch (M5)
3# simulators, in light mode at 9:41 with a full status bar. Each screen opens through the Debug
4# build's -screenshot launch argument (DayByDay/Screenshots/ScreenshotScene.swift) on a demo
5# child. The 6.3" set is resized from the 6.9" one; every PNG is flattened to RGB.
6# Usage: scripts/take-screenshots.sh [scene ...] (default: every scene, in App Store order)
7set -eu
8
9cd "$(dirname "$0")/.."
10all="home routine animals train trace counting calendar progress"
11scenes="${*:-$all}"
12out=AppStore/screenshots
13derived=.build/screenshots
14app="$derived/Build/Products/Debug-iphonesimulator/DayByDay.app"
15bundle=net.cleberg.DayByDay
16
17xcodebuild build -project DayByDay.xcodeproj -scheme DayByDay -configuration Debug \
18 -destination 'generic/platform=iOS Simulator' -derivedDataPath "$derived" -quiet
19
20udid() {
21 xcrun simctl list devices available | grep -F " $1 (" | head -1 | sed 's/.*(\([0-9A-F-]\{36\}\)).*/\1/'
22}
23
24flatten() {
25 # Drops the alpha channel, which App Store Connect rejects.
26 sips -s format jpeg -s formatOptions 100 "$1" --out "$1.jpg" >/dev/null
27 sips -s format png "$1.jpg" --out "$1" >/dev/null
28 rm "$1.jpg"
29}
30
31shoot() { # device name, output folder
32 device="$(udid "$1")"
33 [ -n "$device" ] || { echo "No simulator named $1." >&2; exit 1; }
34 xcrun simctl boot "$device" 2>/dev/null || true
35 xcrun simctl bootstatus "$device" -b >/dev/null
36 xcrun simctl ui "$device" appearance light
37 xcrun simctl status_bar "$device" override --time 9:41 --dataNetwork wifi --wifiMode active \
38 --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100
39 xcrun simctl install "$device" "$app"
40 mkdir -p "$out/$2"
41 for scene in $scenes; do
42 n="$(printf '%s\n' $all | grep -nx "$scene" | cut -d: -f1)"
43 [ -n "$n" ] || { echo "Unknown scene $scene; one of: $all" >&2; exit 1; }
44 xcrun simctl terminate "$device" "$bundle" 2>/dev/null || true
45 xcrun simctl launch "$device" "$bundle" -screenshot "$scene" -hasSeenVoiceTip YES >/dev/null
46 file="$out/$2/$(printf %02d "$n")-$scene.png"
47 # A screen that has not drawn yet is blank white, which compresses to a few KB.
48 tries=0
49 while :; do
50 sleep 3
51 xcrun simctl io "$device" screenshot "$file" >/dev/null 2>&1
52 [ "$(stat -f%z "$file")" -gt 100000 ] && break
53 tries=$((tries + 1))
54 [ "$tries" -lt 10 ] || { echo "$scene stayed blank on $1." >&2; exit 1; }
55 done
56 flatten "$file"
57 echo "$file"
58 done
59 xcrun simctl terminate "$device" "$bundle" 2>/dev/null || true
60 xcrun simctl status_bar "$device" clear
61}
62
63shoot "iPhone 18 Pro Max" iphone-6.9
64shoot "iPad Pro 13-inch (M5)" ipad
65
66mkdir -p "$out/iphone-6.3"
67for file in "$out"/iphone-6.9/*.png; do
68 sips -z 2622 1206 "$file" --out "$out/iphone-6.3/$(basename "$file")" >/dev/null
69done