Skip to content

Project Setup

Source of Truth

  • The checked-in BionicLoop.xcodeproj is the primary project definition for daily work.
  • project.yml is partial and does not fully represent all manual wiring in the checked-in project.
  • For routine development, do not regenerate the project.
  • project.yml has been updated to the current app paths (BionicLoop sources and BionicLoop/Resources/Info.plist) so explicit regen work starts from the refactored layout.

Build and Test

From repo root:

xcodebuild -list -project BionicLoop.xcodeproj
xcodebuild -scheme BionicLoop -project BionicLoop.xcodeproj -destination 'platform=iOS Simulator,name=iPhone 17' build
xcodebuild -scheme BionicLoop -project BionicLoop.xcodeproj -destination 'platform=iOS Simulator,name=iPhone 17' test

In Xcode:

  1. Open BionicLoop.xcodeproj.
  2. Select the BionicLoop scheme.
  3. Build/run on simulator or device.

Dependency Notes

The repo includes local packages/subprojects used by the app:

  • BionicLoopCore
  • OmniBLE
  • G7SensorKit and G7SensorKitUI
  • LoopKit / LoopKitUI

Keep dependency wiring changes in BionicLoop.xcodeproj/project.pbxproj unless a full project-regeneration task is explicitly required.

When to Run XcodeGen

Use xcodegen generate only for explicit project-structure work. After regeneration:

  1. Compare BionicLoop.xcodeproj/project.pbxproj with git.
  2. Re-apply any required manual wiring that was lost.
  3. Build with xcodebuild before continuing feature work.

Paths to Keep in Sync

  • App plist path: BionicLoop/Resources/Info.plist
  • App assets: BionicLoop/Resources/Assets.xcassets

Build Numbering

  • App build number (CFBundleVersion) is set during build from git commit count:
  • git rev-list --count HEAD
  • This is implemented in target build phase:
  • Set Build Number from Git in BionicLoop.xcodeproj/project.pbxproj
  • The script is worktree-safe:
  • It runs git -C "$SRCROOT" rev-list --count HEAD and does not assume .git is a directory.
  • If git metadata is unavailable, it falls back to build number 1.
  • The build-phase is configured to run on every build.
  • Marketing version remains in plist:
  • CFBundleShortVersionString in BionicLoop/Resources/Info.plist