madeye 为 meow iOS 首页小组件 PR 完成合并前审查与修复

meow iOS 首页小组件 PR #384(为 VPN 开关与路由模式添加主屏小组件)合并前,维护者 madeye 推送了审查与修复:分支 rebase 到 main(a423904),解决 scripts/build-adhoc.sh(保留 main 的 Ad Hoc profile UUID,另加 WIDGET_PROFILE)与 project.pbxproj(由合并后的 project.yml 重新生成)的冲突;提交 04297b2 为 SubscriptionsView.swift 补上 import MeowModels——RouteMode 已移入 MeowModels,该视图持有 @State RouteMode 却未导入,正是 Release archive 任务以 cannot find type 'RouteMode' in scope 失败的原因。审查结论:无其他阻塞问题,TunnelControl 与 VpnManager 原有启停行为一致,小组件 entitlements 与 ATS 本地网络配置无误;他报告本地 swiftformat、swiftlint、Release archive 与模拟器/单元测试均通过,仅 tvOS 因本地缺切片依赖远端任务。发布构建前仍需 com.tangzixiang.meow.Widgets 的 App ID 及其 App Store / Ad Hoc profile(prod.env 的 WIDGET_PROFILE / ADHOC_WIDGET_PROFILE),在此之前 upload-testflight.sh 与 build-adhoc.sh 会提前退出;小组件真机测试尚未进行。

作者原文

Maintainer review + fix-up before merge:

Changes pushed to this branch

  • Rebased onto main (a423904). Resolved conflicts:
  • scripts/build-adhoc.sh: kept main's current Ad Hoc profile UUIDs (6b66d5ed… / 52586a3b…) and added WIDGET_PROFILE.
  • meow-ios.xcodeproj/project.pbxproj: regenerated from the merged project.yml with scripts/generate-xcodeproj.sh (xcodegen 2.45.4).
  • 04297b2: added import MeowModels to App/Sources/Views/SubscriptionsView.swift. RouteMode moved into MeowModels, but this view holds a @State RouteMode and never imported the module. That is why the Release archive job failed (cannot find type 'RouteMode' in scope).

Review: no other blocking issues. TunnelControl reproduces VpnManager's previous start/stop behaviour exactly. The widget entitlements and ATS local-networking setup look right.

Local verification (macOS, Xcode 26 SDK)

  • ☑ swiftformat --lint . → 0/153 files require formatting (SwiftFormat 0.63.1)
  • ☑ swiftlint --strict → 0 violations (SwiftLint 0.65.1)
  • ☑ xcodebuild archive -scheme meow-ios -configuration Release -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO → ARCHIVE SUCCEEDED; MeowWidgets.appex is embedded next to PacketTunnel.appex
  • ☑ xcodebuild test -scheme meow-ios -destination 'platform=iOS Simulator,name=iPhone 17' -testLanguage en → TEST SUCCEEDED (MeowTests, MeowUITests, MeowIntegrationTests)
  • ☑ swift test in MeowShared/ → 37 tests passed, including RouteModeTests
  • ☑ git diff origin/main...HEAD --stat checked: 38 files, all on-topic
  • tvOS: not built locally (my local MeowCore.xcframework has no tvOS slice), so this relies on the remote tvos-build job.

Still needed before a release build: the com.tangzixiang.meow.Widgets App ID and its App Store / Ad Hoc profiles (WIDGET_PROFILE / ADHOC_WIDGET_PROFILE in prod.env). Until they exist, upload-testflight.sh and build-adhoc.sh exit early. On-device testing of the widgets is also still to do.

Thanks @gengjiawen!