Skip to content

chore(swift): migrate project to swift 6#68

Open
QiuZhiFei wants to merge 1 commit into
douban:masterfrom
QiuZhiFei:feat-swift6-phase2-part6
Open

chore(swift): migrate project to swift 6#68
QiuZhiFei wants to merge 1 commit into
douban:masterfrom
QiuZhiFei:feat-swift6-phase2-part6

Conversation

@QiuZhiFei
Copy link
Copy Markdown

变更概述

本 PR 将 FRDIntent 工程整体迁移到 Swift 6,并完成并发相关适配,使 FRDIntentTests 在 Swift 6 配置下可通过 test build。

主要修改

  • 升级工程与 Pod 配置:SWIFT_VERSION 到 6.0,IPHONEOS_DEPLOYMENT_TARGET 到 13.0,FRDIntent.podspec 版本更新到 0.10.6
  • 并发语义适配:
    • FRDIntentReceivableinit(extras:) 标注为 @MainActor
    • FRDControllerManagerFRDURLRoutes 补充必要的 @MainActor 隔离标注。
    • 路由管理相关类型补充 @unchecked Sendable 声明。
  • 测试用例并发适配:测试类增加主线程隔离标注,消除 Swift 6 下的隔离冲突。

测试结果

已执行:

  • xcodebuild -project FRDIntent.xcodeproj -scheme FRDIntentTests -configuration Debug -destination 'generic/platform=iOS Simulator' -derivedDataPath /private/tmp/FRDIntentTests-DD build-for-testing

结果:TEST BUILD SUCCEEDED

风险与说明

  • 主要风险在于 Swift 6 并发隔离引入后的调用上下文变化;本次改动已通过 test build 验证核心路径。
  • 当前仍有少量非阻塞 warning(例如 keyWindow deprecated),不影响本次提交目标。

@QiuZhiFei QiuZhiFei added the wip label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant