Skip to content

Xcode 27 recommended settings and the last build warnings - #11

Merged
xuandung38 merged 4 commits into
mainfrom
fix/xcode-27-recommended-settings-and-warnings
Oct 9, 2026
Merged

xuandung38 merged 4 commits into
mainfrom
fix/xcode-27-recommended-settings-and-warnings

Conversation

@xuandung38

Copy link
Copy Markdown
Contributor

What

  • Project settings: options.xcodeVersion: "27.0" (xcodegen wrote LastUpgradeCheck = 1430, so Xcode 27 kept asking to Update to recommended settings) and the project-level settings Xcode 27 recommends: ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS, DEAD_CODE_STRIPPING, ENABLE_USER_SCRIPT_SANDBOXING, LOCALIZATION_PREFERS_STRING_CATALOGS = YES, CLANG_CXX_LANGUAGE_STANDARD gnu++20, GCC_C_LANGUAGE_STANDARD gnu17. Tools/make-test-scheme.sh writes LastUpgradeVersion = 2700. No target has a run-script phase or C sources, so nothing built changes. The list comes from Xcode 27's Base_ProjectSettings template and its UntitledAppProjectPrototype; DEAD_CODE_STRIPPING was the item that made the warning go away.
  • Mac, user-visible fix: WindowPresenter set window.delegate to a fresh object nobody retained (weak delegate), so windowWillClose never ran and closing Pair Phone never took the app back to .accessory. The presenter now owns the delegate (CHANGELOG, Unreleased › Fixed).
  • HLDesignSystem: the generator no longer writes AccentColor.colorset into the package catalog — Xcode derives the asset symbol without the Color suffix, so it clashed with the accent token (#warning in GeneratedAssetSymbols.swift). Both app targets read the global accent color from macOS/HandLive/Resources/Assets.xcassets, which keeps its copy; ColorSetTests checks the app's AccentColor against the package's accent-fill.
  • Warnings: PairingQRCode.moduleAlignedSide is nonisolated (pure arithmetic, called synchronously from a test); the transport fakes discard accept()'s result on purpose.

Checks

  • xcodebuild build-for-testing of HLTests-all from a clean DerivedData: only the two vendored GRDB warnings remain; HandLive (macOS) and HandLiveiOS (simulator) build without warnings.
  • HLDesignSystemTests, HLMacUITests, HLTransportTests: 268 / 268 passed in Xcode 27.0.
  • generate-design-tokens.py --check: 79 files match; swiftlint lint --strict clean on the changed files.
  • CI: the pinned XcodeGen 2.46.0 is the version used here; project format stays objectVersion = 77, readable by the runner's Xcode 26.

Not in this PR: ThirdParty/GRDB warnings (vendored) and the deliberate SecKeychainItemDelete deprecation in LoginKeychain.swift.

🤖 Generated with Claude Code

xcodegen wrote LastUpgradeCheck = 1430, so Xcode 27 kept asking to update to its recommended settings. options.xcodeVersion is now 27.0 and the project carries the settings Xcode 27 recommends at the project level: asset symbol extensions, gnu++20 and gnu17, dead code stripping, user script sandboxing and string catalogs preferred. The HLTests-* schemes say LastUpgradeVersion 2700 as well. No target has a run-script phase or C sources, so what is built does not change.

Signed-off-by: Hồ Xuân Dũng <me@hxd.vn>
NSWindow.delegate is weak, so the WelcomeWindowDelegate died as soon as it was assigned and windowWillClose never ran: the welcome window stayed recorded as open and the app never went back to .accessory after Pair Phone was closed. WindowPresenter now owns the delegate until the window closes.

Signed-off-by: Hồ Xuân Dũng <me@hxd.vn>
…em catalog

Xcode names generated asset symbols without the Color suffix, so AccentColor and the accent token both became .accent and HLDesignSystem's generated symbols carried a warning. Only the app catalog needs AccentColor (the global accent color of both app targets reads it from there); the generator no longer writes it into the package catalog, and the test checks the app's AccentColor against the package's accent-fill instead.

Signed-off-by: Hồ Xuân Dũng <me@hxd.vn>
…t support

moduleAlignedSide is pure arithmetic and is now nonisolated, so the test can call it synchronously without the main-actor warning; the fake phones discard the capability data that accept() returns on purpose.

Signed-off-by: Hồ Xuân Dũng <me@hxd.vn>
@xuandung38
xuandung38 merged commit 96bb471 into main Oct 9, 2026
5 checks passed
@xuandung38
xuandung38 deleted the fix/xcode-27-recommended-settings-and-warnings branch October 14, 2026 12:31
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