superUsage.xcodeproj is the primary app-development surface. It provides one shared superUsage
scheme for Run, Profile, Analyze, and Archive.
-
project.ymlis the source of truth. -
superUsage.xcodeprojis generated and committed so contributors can open it without installing a generator. -
Regenerate after target, dependency, capability, or build-setting changes:
xcodegen generate --spec project.yml
-
Do not hand-edit
project.pbxproj; regeneration would overwrite those edits.
The project keeps the Swift package source layout. UsageSync and the SuperUsage module are built
as internal frameworks, while Sources/SuperUsageApp contains the thin macOS app entry point.
Because SuperUsage dynamically links Sparkle, the app target explicitly embeds and signs
Sparkle.framework. A post-build verification script fails the build if that runtime dependency is
missing or has an invalid signature.
The same three remote packages are pinned twice, because two build paths resolve them independently:
| File | Governs |
|---|---|
Package.resolved |
swift build and swift test, run locally by whoever is working on the change |
superUsage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved |
Xcode locally and Xcode Cloud release builds |
Both are committed, and they must pin the same set of dependencies at the same version and revision —
otherwise the tests prove one version and users get another. Nothing syncs them automatically:
Dependabot's swift ecosystem only understands the SwiftPM manifest, so its bumps move the first file
alone. The Lockfiles agree CI job fails the PR on any disagreement: a version or revision that
differs, a dependency pinned in one file and not the other, a file that pins nothing, or a file that
has gone missing.
After any dependency change, resolve both, then git add both:
swift package resolve
xcodebuild -project superUsage.xcodeproj -scheme superUsage -resolvePackageDependenciesgit status showing a deletion of
a file you never touched — you've hit a state where xcodebuild removes the file moments after
writing it. It is not universal (a clean checkout resolves normally), but it reproduces persistently
in some working copies, and it is why this file has been committed as a deletion before. Never commit
that deletion: git checkout -- <path> puts it back. When the resolve genuinely changed it, copy it
out while the resolve is running and stage the copy directly, since the working-tree file won't
survive long enough for git add:
LOCK=superUsage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
git hash-object -w /path/to/copy | xargs -I{} git update-index --add --cacheinfo 100644,{},"$LOCK"
git checkout -- "$LOCK" # index now holds the new content; put it back in the working tree tooDon't skip that last line. update-index alone stages the new content while the working tree still
shows the file as deleted (git status reports MD), and the next git add -A would quietly stage
the deletion back over your update.
- Team: Chengdu Weisen Quwan Technology Co., Ltd (
C554753V8P) - App bundle ID:
com.weisenjoytech.superusage - CloudKit container:
iCloud.com.weisenjoytech.usage.sync - Signing: automatic
The personal team TP656CVH5C must never be selected for this product.
The development version remains 0.0.0 build 0. Do not choose a public release version without
product-owner approval.
An unsigned Debug build works for compile and bundle validation:
xcodebuild \
-project superUsage.xcodeproj \
-scheme superUsage \
-configuration Debug \
-destination 'generic/platform=macOS' \
CODE_SIGNING_ALLOWED=NO \
buildWith the company account available in Xcode, Generic Mac Build and Product → Archive use the managed company profile. The final app entitlement must contain:
- application identifier
C554753V8P.com.weisenjoytech.superusage - team identifier
C554753V8P - CloudKit service
- container
iCloud.com.weisenjoytech.usage.sync
Xcode Run needs a development profile containing this Mac's Provisioning UDID. If Xcode says the Mac is not registered, the project and CloudKit configuration are still valid: an Account Holder or Admin must register the Mac in the company team or grant device-management permission. Generic Mac Build and Archive do not prove that the current Mac is included in the profile.
Do not work around that error by switching to the personal team.