CI 使用最新的 Xcode 26,修复 unregister 跨隔离域传递

This commit is contained in:
gentpan committed 2026-09-13 03:15:14 +05:00
1 parent 3daa7a4541
commit 7e8fffbe9e
5 files changed
+17 -9

No files matched your search

+6 -4
View File
@@ -12,13 +12,15 @@ jobs:
- uses: actions/checkout@v7
# CommandLineTools alone cannot expand SwiftUI's @Observable / @Entry
# macros — the plugins ship only with full Xcode. Use the runner's
# default Xcode rather than pinning a version that may not be installed
# on a future image.
# macros — the plugins ship only with full Xcode. Liquid Glass needs the
# macOS 26 SDK, so pick the newest Xcode on the image rather than the
# default one or a pinned version that a future image may not carry.
- name: Select Xcode
run: |
ls -d /Applications/Xcode*.app
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
XCODE=$(ls -d /Applications/Xcode_*.app | sort -V | tail -1)
echo "Using $XCODE"
sudo xcode-select -s "$XCODE/Contents/Developer"
swift --version
- name: Install XcodeGen
+2 -1
View File
@@ -19,7 +19,8 @@ hosting SwiftUI, no third-party dependencies. The Xcode project is generated fro
## Build
**A full Xcode is required.** CommandLineTools does not ship the SwiftUI macro plugins.
**Xcode 26 or later is required** — the macOS 26 SDK provides Liquid Glass, and
CommandLineTools does not ship the SwiftUI macro plugins.
```bash
brew install xcodegen
@@ -75,7 +75,12 @@ public final class HelperClient {
connection?.invalidate()
connection = nil
do {
try await service.unregister()
// 使用回调版本:不把非 Sendable 的 SMAppService 跨隔离域传递
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in
service.unregister { error in
if let error { continuation.resume(throwing: error) } else { continuation.resume() }
}
}
} catch {
lastError = "卸载失败:\(error.localizedDescription)"
}
+2 -2
View File
@@ -185,8 +185,8 @@ app's user defaults and contain nothing personal. There is no analytics and no t
## Build & run
Requires macOS 14+, a **full Xcode** (the SwiftUI macro plugins do not ship with
CommandLineTools) and [XcodeGen](https://github.com/yonaskolb/XcodeGen).
Requires macOS 14+, **Xcode 26 or later** (the macOS 26 SDK for Liquid Glass; CommandLineTools
alone lacks the SwiftUI macro plugins) and [XcodeGen](https://github.com/yonaskolb/XcodeGen).
```bash
brew install xcodegen
+1 -1
View File
@@ -168,7 +168,7 @@ OpenStats **不发起任何网络连接**。指标来自本机的内核接口(
## 构建与运行
需要 macOS 14+、**完整的 Xcode**(CommandLineTools 不含 SwiftUI 宏插件)以及
需要 macOS 14+、**Xcode 26 或更高版本**(液态玻璃需要 macOS 26 SDK;仅有 CommandLineTools 时缺少 SwiftUI 宏插件)以及
[XcodeGen](https://github.com/yonaskolb/XcodeGen)。
```bash