Compare two built macOS apps and see which permissions or code signatures changed before you ship an update.
BundleDelta reads the previous release and the candidate on disk. Each finding names the affected component and shows its old and new values. It works with finished app bundles from Xcode, Electron, or Tauri that use the standard macOS bundle layout.
You need a Mac with macOS 13 or later and a Swift 5.9+ toolchain. The demo uses the Xcode Command Line Tools and ad-hoc signing. It needs no signing identity.
Clone the repository and run the self-contained demo:
git clone https://github.com/erossx/BundleDelta.git
cd BundleDelta
./script/build_and_run.shThe demo builds the CLI, creates two temporary signed apps and compares them. Neither app is launched. In the candidate, the microphone usage message is still present, but the signed entitlement that permits audio input has disappeared.
2 field changes
. (main app)
- entitlement.com.apple.security.device.audio-input: true
Contents/Helpers/Transcriber
~ signature.identifier: org.bundledelta.demo.transcriber → org.bundledelta.demo.transcriber-v2
swift build -c release
tool="$(swift build -c release --show-bin-path)/bundledelta"
"$tool" "releases/previous/VoiceNote.app" "build/VoiceNote.app"
"$tool" --json "releases/previous/VoiceNote.app" "build/VoiceNote.app" > comparison.jsonPass extracted, unchanged .app directories. If an argument starts with a dash, put -- before the paths. Use --help for the complete CLI.
| Compared field | What a change tells you |
|---|---|
| Signed entitlements | A capability was added, removed, or given a different value. Dictionary keys are sorted and array order is preserved. |
| Code signature | Signing state, signing identifier, Team ID, hardened runtime, certificate chain names or leaf certificate fingerprint changed. Certificate renewal can legitimately change the fingerprint. |
| Privacy prompts | A usage description in a built Info.plist or a localized InfoPlist.strings changed. Localized findings identify the language. |
| Embedded components and architectures | A helper, framework, XPC service, app extension, or standalone Mach-O was added, removed, or signed differently. Universal binaries are inspected by architecture. |
Paths are relative to the outer app. . is the main app. A renamed component appears at its old and new paths. Added or removed components include their individual fields. Shared universal-binary values appear once. Values that differ between slices carry a slice.<architecture>. prefix.
Run the comparison after signing and packaging, on a macOS runner with both extracted bundles available. Add this step to your release workflow:
- name: Compare app signing and permissions
uses: erossx/[email protected]
with:
baseline: artifacts/previous/VoiceNote.app
candidate: artifacts/candidate/VoiceNote.app
fail-on-change: 'true'The action builds BundleDelta and writes the diff to the job log. Its default is to fail on any difference. Set fail-on-change: 'false' for a reporting-only step. To use a local checkout of the action, use its checkout path, for example uses: ./ inside this repository.
| CLI exit code | Meaning |
|---|---|
| 0 | Comparison completed. By default, findings are reported without failing. |
| 1 | Differences found while --fail-on-change was set. |
| 2 | Invalid invocation or an app could not be inspected. |
The JSON report has schemaVersion: 1, app names, and a sorted changes array. Each change has a relative path, field, kind (added, removed, changed), and the applicable before and after strings. Missing sides are omitted. Entitlement values retain their plist types in their textual representation.
The check compares release artifacts. Identical reports can include two equally unsigned apps, two invalid signatures with the same recorded status, or the same missing entitlement in both releases. Choose a known-good baseline. A permission change can be intentional, so review it in the context of the release.
Signature validation uses Apple's Security framework and checks sealed contents. Gatekeeper assessment, notarization tickets, provisioning profile policy, runtime permission grants, and whether the microphone actually records are separate checks. Supply extracted apps rather than DMG or PKG installers. The scanner skips general filesystem symlinks and follows conventional bundle metadata links only within the bundle. Resource-only bundles have no separate code-signing entry.
swift build -c release
tests/integration.sh "$(swift build -c release --show-bin-path)/bundledelta"The tests use Python 3, the Xcode Command Line Tools and fresh local fixtures. To keep the two demo apps for manual inspection, run scripts/make-demo.sh /path/to/new-directory with an existing parent directory.
