Add a Live Activity for the running workout
A new iOS widget extension shows the active exercise, its phase, and the work/rest countdown on the lock screen and in the Dynamic Island, driven by the run flow's live frames so locking the phone mid-set keeps the timer. The activity is seeded on open, refreshed on every page settle, dismissed when the flow is left, and cleared on next launch if stranded. Unifies the build-info stamping across all targets via a YAML anchor. Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
+39
-16
@@ -23,6 +23,19 @@ packages:
|
||||
url: https://git.rzen.dev/rzen/indie-sync.git
|
||||
from: "0.3.0"
|
||||
|
||||
# Shared post-build phase — stamps CFBundleVersion (git commit count), BuildDate, and
|
||||
# BuildHash into each target's (and dSYM's) Info.plist. Aliased into every code-bearing
|
||||
# target below so the app, watch app, and both widget extensions stamp identical metadata.
|
||||
scriptAnchors:
|
||||
updateBuildInfo: &updateBuildInfo
|
||||
- script: '"${SRCROOT}/../indie-skills/skills/app-versioning/scripts/update_build_info.sh"'
|
||||
name: Update Build Info
|
||||
shell: /bin/sh
|
||||
basedOnDependencyAnalysis: false
|
||||
inputFiles:
|
||||
- $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
|
||||
- $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Info.plist
|
||||
|
||||
targets:
|
||||
# ---- iOS app (owns iCloud Drive sync; embeds the watch app) ----------------
|
||||
Workouts:
|
||||
@@ -43,18 +56,16 @@ targets:
|
||||
- path: LICENSE.md
|
||||
buildPhase: resources
|
||||
type: file
|
||||
# The Live Activity attributes are shared with the widget extension (which owns the
|
||||
# folder); the app compiles just this one file so it can start / update / end the activity.
|
||||
- path: "Workouts Widget/WorkoutActivityAttributes.swift"
|
||||
dependencies:
|
||||
- package: IndieAbout
|
||||
- package: IndieSync
|
||||
- target: Workouts Watch App
|
||||
postBuildScripts:
|
||||
- script: '"${SRCROOT}/../indie-skills/skills/app-versioning/scripts/update_build_info.sh"'
|
||||
name: Update Build Info
|
||||
shell: /bin/sh
|
||||
basedOnDependencyAnalysis: false
|
||||
inputFiles:
|
||||
- $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
|
||||
- $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Info.plist
|
||||
- target: Workouts Widget
|
||||
embed: true
|
||||
postBuildScripts: *updateBuildInfo
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts
|
||||
@@ -105,14 +116,7 @@ targets:
|
||||
- package: IndieSync
|
||||
- target: Workouts Watch Widget
|
||||
embed: true
|
||||
postBuildScripts:
|
||||
- script: '"${SRCROOT}/../indie-skills/skills/app-versioning/scripts/update_build_info.sh"'
|
||||
name: Update Build Info
|
||||
shell: /bin/sh
|
||||
basedOnDependencyAnalysis: false
|
||||
inputFiles:
|
||||
- $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
|
||||
- $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Info.plist
|
||||
postBuildScripts: *updateBuildInfo
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts.watchkitapp
|
||||
@@ -153,6 +157,7 @@ targets:
|
||||
- path: Workouts Watch Widget
|
||||
excludes:
|
||||
- "Resources/Info-*.plist"
|
||||
postBuildScripts: *updateBuildInfo
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts.watchkitapp.widget
|
||||
@@ -161,3 +166,21 @@ targets:
|
||||
SWIFT_STRICT_CONCURRENCY: complete
|
||||
WATCHOS_DEPLOYMENT_TARGET: "26.0"
|
||||
TARGETED_DEVICE_FAMILY: "4"
|
||||
|
||||
# ---- iOS widget extension (the active-workout Live Activity: lock screen + Dynamic Island) --
|
||||
Workouts Widget:
|
||||
type: app-extension
|
||||
platform: iOS
|
||||
sources:
|
||||
- path: Workouts Widget
|
||||
excludes:
|
||||
- "Resources/Info-*.plist"
|
||||
postBuildScripts: *updateBuildInfo
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts.widget
|
||||
INFOPLIST_FILE: "Workouts Widget/Resources/Info-Widget.plist"
|
||||
GENERATE_INFOPLIST_FILE: false
|
||||
SWIFT_STRICT_CONCURRENCY: complete
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "26.0"
|
||||
TARGETED_DEVICE_FAMILY: "1"
|
||||
|
||||
Reference in New Issue
Block a user