Project Setup
Source of Truth
- The checked-in
BionicLoop.xcodeprojis the primary project definition for daily work. project.ymlis partial and does not fully represent all manual wiring in the checked-in project.- For routine development, do not regenerate the project.
project.ymlhas been updated to the current app paths (BionicLoopsources andBionicLoop/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:
- Open
BionicLoop.xcodeproj. - Select the
BionicLoopscheme. - Build/run on simulator or device.
Dependency Notes
The repo includes local packages/subprojects used by the app:
BionicLoopCoreOmniBLEG7SensorKitandG7SensorKitUILoopKit/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:
- Compare
BionicLoop.xcodeproj/project.pbxprojwith git. - Re-apply any required manual wiring that was lost.
- Build with
xcodebuildbefore 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 GitinBionicLoop.xcodeproj/project.pbxproj- The script is worktree-safe:
- It runs
git -C "$SRCROOT" rev-list --count HEADand does not assume.gitis 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:
CFBundleShortVersionStringinBionicLoop/Resources/Info.plist