- macOS 14 (Sonoma) or newer
- Xcode 15 or newer
- Swift 5.9 or newer (bundled with Xcode)
- XcodeGen —
brew install xcodegen
git clone <repo-url>
cd LogWeight
xcodegen generate
open LogWeight.xcodeprojThe .xcodeproj is always generated from project.yml. Do not edit the generated .xcodeproj directly — your changes will be overwritten the next time anyone runs xcodegen generate. To change the project structure, edit project.yml and re-run.
Phase 4 expands iOS UI coverage beyond the original smoke test. Current UI suite checks:
- stepper-primary save flow,
- keyboard-disabled Save behavior (DA1 guard),
- history trend chart presence,
- settings control reachability,
- large Dynamic Type (
Accessibility XXXL) save path.
Icons live in Asset Catalogs and are generated from a small Swift tool (no extra dependencies beyond macOS + Xcode):
App/iOS/Resources/Assets.xcassets/AppIcon.appiconset/— iPhone + iPad + App Store marketing sizes.App/Watch/Resources/Assets.xcassets/AppIcon.appiconset/— watch roles +watch-marketing1024×1024.App/macOS/Resources/Assets.xcassets/AppIcon.appiconset/— macOS icon slots (1×/2×).
Regenerate after changing colours or the symbol in Tools/GenerateAppIcons.swift:
swift Tools/GenerateAppIcons.swift
xcodegen generatecd Packages/LogWeightCore
swift testxcodegen generate
xcodebuild test \
-scheme LogWeight \
-destination 'platform=iOS Simulator,name=iPhone 15'The LogWeightWatch scheme builds the Watch app and its WidgetKit extension without requiring a paired iPhone simulator destination:
xcodegen generate
xcodebuild build \
-project LogWeight.xcodeproj \
-scheme LogWeightWatch \
-destination 'generic/platform=watchOS Simulator' \
CODE_SIGNING_ALLOWED=NOTo run on a paired simulator, choose the LogWeightWatchApp run destination in Xcode after opening the generated project. On a physical Watch, install via the iOS app’s Watch companion flow once signing is configured for both targets.
Use the LogWeightMac scheme. The app is a menu-bar utility (LSUIElement); after launch, choose the scalemass item in the menu bar. HealthKit prompts the first time you save.
xcodegen generate
xcodebuild build \
-project LogWeight.xcodeproj \
-scheme LogWeightMac \
-destination 'platform=macOS' \
CODE_SIGNING_ALLOWED=NOThe placeholder bundle identifier in Phase 1 is dev.logweight.LogWeight. Before TestFlight or App Store submission, change bundleIdPrefix in project.yml to your real Apple Developer Team prefix and re-run xcodegen generate.
project.yml sets CODE_SIGN_STYLE: Automatic with an empty DEVELOPMENT_TEAM. After running xcodegen generate, open the project in Xcode and select your team in the Signing & Capabilities tab. The team setting is per-developer and is intentionally not committed.
| Field | Source | Updated by |
|---|---|---|
Marketing version (MARKETING_VERSION, user-facing) |
project.yml |
release-please when you merge its Release PR on main |
Build number (CFBundleVersion) |
derived from git (Tools/build-number.sh, commit count) |
automatically: every merge to main adds a commit; nothing is committed or pushed |
VERSIONING_SYSTEMisapple-genericinproject.yml.- Do not hand-edit
MARKETING_VERSIONfor releases; use the Release PR. - Baseline release tag:
v0.3.0(seeCHANGELOG.md).
For a major semver bump, use one of:
feat!: …/fix!: …in the subject, orBREAKING CHANGE:in the commit body.
- Set your real bundle ID prefix and team in
project.yml. - Merge feature work to
main(the build number rises automatically with the commit count). - When ready for a new user-facing version, merge the Release PR from release-please on
main(updatesMARKETING_VERSIONandCHANGELOG.md; createsvX.Y.Zon GitHub). - Pull
main, runxcodegen generate, archive in Xcode (Product → Archive). - Upload to App Store Connect.
- Add a privacy policy URL in App Store Connect —
support/privacy/index.html, published athttps://juuronina.de/LogWeight/support/privacy/(seedocs/AppStoreMetadata.md), usingdocs/Privacy.mdas the canonical statement. - Fill App Store listing fields from
docs/AppStoreMetadata.md. - Use localized listing variants from
docs/AppStoreMetadata.localized.md. - Walk through
docs/AppStoreReleaseChecklist.mdbefore pressing Submit for Review.
Baseline simulator captures:
bash Tools/CaptureStoreScreenshots.shOutput folder: docs/store-screenshots/
.github/workflows/ci.yml runs on push to any branch and on workflow_dispatch:
- Core tests:
macos-latest - iOS + watchOS:
macos-14with latest-stable Xcode (matches the historical ~8m iOS job)
cd Packages/LogWeightCore && swift test— Core unit tests.- In parallel after (1): iOS and watchOS jobs each run
.github/actions/apple-ci-setup(Homebrew download cache, DerivedData cache,xcodegen generate). - iOS: ensure iOS/watchOS simulator platforms only when missing, then
xcodebuild test— all 13EntryViewSmokeTests. - watchOS: ensure watchOS simulator platform when missing, then
xcodebuild build -scheme LogWeightWatch …— app + widget extension compile check.
.github/workflows/release-please.yml runs on push to main and opens or updates a Release PR from Conventional Commits since the last v* tag.
CI cannot exercise real HealthKit (no entitlements on GitHub-hosted runners). The --use-in-memory-store launch argument injects InMemoryHealthKitStore for UI tests.
Tools/asc-release.py takes a release from a clean checkout to "version has build, screenshots and texts" (spec: specs/001-asc-store-sync). Preview is the default; nothing is written without --apply.
Prerequisites: pip install PyJWT cryptography, Xcode, and a git-ignored .env with ASC_KEY_ID, ASC_ISSUER_ID, ASC_KEY_PATH (App Store Connect API key). Secret values are never printed.
Tools/asc-release.py status # read-only: local layout + store state
Tools/asc-release.py screenshots --locale de-DE # preview one locale
Tools/asc-release.py all --apply # build, upload, attach build, screenshots, texts- Target version defaults to
MARKETING_VERSIONinproject.yml; use--versionwhen the store spells it differently (for example1.1). If the version is missing in the store it is created, never submitted. - Build number is the git commit count (
Tools/build-number.sh;BUILD_NUMBERoverrides it). A Run Script phase (Tools/set-build-number.sh) writes it into every app and extension in Release/archive builds, so Product → Archive in Xcode gets the same number as the tool.build --applyrefuses uncommitted changes or a commit not onorigin/main(--allow-unmergedoverrides) and verifies the archive: same number in all bundles, signature valid. If the number is already used by an unusable build, or by another version, the run stops.Config/Version.xcconfigonly holds a Debug placeholder. - Screenshots:
docs/store-screenshots/<store-locale>/<device>/NN-name.png, exactly the required set per device (iPhone, iPad, Duo outer:01-entry,02-history,03-settings; Duo inner adds04-entry-landscape,05-history-landscape; Watch:01-entry,02-history). Unchanged images are not re-uploaded; order follows the number prefix. - Release notes ("What's New") come from
docs/AppStoreWhatsNew.md: rewrite it for every release and set its**Version:**line; the sync refuses a stale file. - Texts come from
docs/AppStoreMetadata.md(English, also used for en-US/en-GB/en-CA) anddocs/AppStoreMetadata.localized.md. Only changed fields are written. - Exit codes: 0 ok, 1 usage/config, 2 validation (nothing written), 3 store refused part of the run (safe to re-run), 4 version not editable.
- Unit tests (no network):
cd Tools && python3 -m unittest discover -s asc/tests -t .