Skip to content

upgrade to support m*#66

Open
qingmo wants to merge 5 commits into
MacPass:masterfrom
qingmo:master
Open

upgrade to support m*#66
qingmo wants to merge 5 commits into
MacPass:masterfrom
qingmo:master

Conversation

@qingmo

@qingmo qingmo commented Jun 10, 2026

Copy link
Copy Markdown

No description provided.

qingmo and others added 5 commits June 10, 2026 10:58
The pinned dependencies (GCDWebServer 3.4.1, JSONModel, KeePassHTTPKit)
date from ~2019 and fail to build with current Xcode for two reasons:

1. Their deployment targets (macOS 10.7 / iOS 8.0) are below the
   supported minimum, so linking fails with "SDK does not contain
   'libarclite'" because Apple removed libarclite_*.a in Xcode 14.3+.

2. GCDWebServer and JSONModel each ship several shared schemes that
   build a framework with the same product name (e.g. both "JSONModel"
   and "JSONModel-mac" produce JSONModel.framework). Carthage builds
   them in parallel and they race to write the same path in
   Carthage/Build/Mac, so the macOS framework is intermittently
   clobbered by an iOS build ("building for macOS, but linking in dylib
   built for iOS") or an arm64-only iOS-device slice (arch-mismatch
   link errors).

Fixes:
- Add carthage-deployment-target.xcconfig that raises the deployment
  targets to the supported minimums (macOS 10.13 / iOS 12.0) and pins
  ARCHS to arm64 (native arch on Apple Silicon; matches MacPass).
- Add build-deps.sh that injects the xcconfig via XCODE_XCCONFIG_FILE
  and runs checkout -> prune -> build, deleting the duplicate non-macOS
  schemes so exactly one scheme per framework remains. This makes the
  build deterministic (verified across repeated clean and incremental
  runs). The fix lives in the script/xcconfig because carthage
  re-checks-out and overwrites the dependency projects on every run.
- Update README to document the build-deps.sh workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
build-deps.sh only handled MacPassHTTP's own Carthage dependencies. The
plugin also requires MacPass's dependencies and several modern-Xcode
workarounds, none of which were scripted. Add build.sh to do the whole
chain end to end.

The plugin compiles against MacPass headers (HEADER_SEARCH_PATHS =
../MacPass/**) and links HNHUi/KeePassKit, so MacPass's own Carthage
dependencies must be built first. build.sh:

1. Builds MacPass's dependencies (sibling ../MacPass checkout): inits
   submodules, prunes iOS/tvOS/watchOS schemes (same same-named-framework
   race as MacPassHTTP's deps), and builds only HNHUi, KeePassKit and
   KissXML — TransformerKit fails to compile on a modern SDK (removed
   Darwin 'xlocale' module) and the plugin does not need it.
2. Builds MacPassHTTP's dependencies via build-deps.sh.
3. Compiles the plugin with the overrides it needs on modern Xcode:
   MACOSX_DEPLOYMENT_TARGET=10.13 (project's 10.10 hits libarclite),
   ARCHS=arm64, MacPass's build dir added to FRAMEWORK_SEARCH_PATHS, and
   CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES=YES (the
   recursive header search path pulls source headers into framework
   modules, which -Werror rejects).
4. Stamps CFBundleVersion (the project's Versioning phase no-ops on clean
   builds, leaving "UNKNOWN") and embeds KeePassHTTPKit's transitive
   frameworks (GCDWebServers, JSONModel) into the installed plugin so it
   can load.

Installs to ~/Library/Application Support/MacPass/MacPassHTTP.mpplugin.
Update README to document the full and manual build paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Raise CURRENT_PROJECT_VERSION (drives CFBundleShortVersionString) from
0.3.2 to 0.3.3 in both the Debug and Release configurations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MacPass runs `codesign --verify` on plugins and shows "Plugin is not
properly signed" when it fails. xcodebuild leaves the bundle with only
the arm64 linker's ad-hoc signature (no sealed resources), and the
post-build Info.plist edit and framework copy would invalidate any real
signature anyway. Add a final inside-out signing pass (nested frameworks
deepest-first, then the outer bundle) plus a verify step. Defaults to
ad-hoc, which MacPass accepts since it pins no signing anchor; override
with CODESIGN_IDENTITY for a distributable build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The two NSBoxes in MacPassHTTPSettings.xib are laid out with Auto Layout
but their content views still use autoresizing masks, so the checkbox
constraints inside never give the boxes an intrinsic height. The boxes
were pinned only top/leading/trailing — no height or bottom — leaving box
height an unconstrained free variable. This was harmless at the xib's
fixed design size, but MacPass embeds the view and stretches it via Auto
Layout (MPPluginPreferencesController), so the ambiguous height collapsed
the Interface box and its checkboxes overlapped.

Pin each box to its design height (Interface 90, Advanced 168) to remove
the ambiguity. ibtool compiles with no errors or warnings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant