Skip to content

[AI] feat: iOS 中转站 App 与分享扩展 - #59

Merged
Hiwoniu merged 37 commits into
mainfrom
feat_ai_wechatbridge_ios-relay-integration
Oct 27, 2026
Merged

Hiwoniu merged 37 commits into
mainfrom
feat_ai_wechatbridge_ios-relay-integration

Conversation

@Hiwoniu

@Hiwoniu Hiwoniu commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

概要

微信流 iOS 第一版:中转站 App 加分享扩展,把微信导出的聊天记录接到 iPhone 上,再投递给豆包、千问等 AI 应用。

主要内容

  • 共享核心:WeChatBridgeCore 支持 iOS 编译;AttachmentImporter、KnowledgeDelivery、FolderDelivery 移入 Core,Mac 与 iOS 共用。
  • iOS 工程:XcodeGen 项目(ios/project.yml,不提交 .xcodeproj)、签名配置(团队、Bundle ID、App Group 可用 Signing.local.xcconfig 覆盖)、测试素材和 ios/Scripts/verify.sh。
  • 分享扩展「微信流」:导出的聊天记录 ZIP、图片、视频、文件原子存入 App Group;会拒收空文件。
  • 动作扩展「分批收集到微信流」:超过 100 条的聊天分批收集,自动复制上一批最后一句,方便在微信里搜索定位。
  • 中转站 App:卡片列表、聊天详情、合并投递、收集管理、删除可撤销、场景绑定、引导页。
  • 投递:
    • 豆包、千问默认收到一份带图 PDF,也可在设置里改为 TXT。
    • 图片和附件可存到「文件 › 我的iPhone › 微信流」或相册。
    • 支持从通知快速投递,有灵动岛实时活动,卡片长按可直接投递。
  • 文档:iOS 功能点、开发技术文档、模拟器验收记录 S1–S11、免费 Apple ID 真机安装指南。

验证

  • 模拟器验收 S1–S11(见文档)。
  • ios/Scripts/verify.sh:Mac swift test、iOS 下 Core 的类型检查、iOS 构建和单元测试。
  • 已在 iPhone 上用免费 Apple ID 装过并试过投递。

说明

不包含分享链接、按来源应用分类和「存入微信流」,这些暂不合入。

xiangmingAI and others added 30 commits October 11, 2026 15:27
- 新增 LanzouUpdateChecker:抓取蓝奏云分享页的 filemoreajax.php 文件列表(兼容 t/k 随机变量名),从文件名解析版本号与 build 号并与当前版本比较
- AppUpdater 增加 fallback:构建无 SUFeedURL 时走蓝奏云检查,状态菜单与通用页此前因无 feed 永久禁用的「检查更新」入口恢复可用
- 关于页新增「软件更新」区块:显示检查状态(检查中 / 已最新 / 发现新版本 / 失败原因),提供「检查更新」与「前往下载」按钮
- 发现新版本时状态菜单项变为「下载新版本 x.y.z…」,点击打开蓝奏云文件页(链接自带 webpage 令牌,无需再输密码)
- 启动时按「自动检查更新」开关每日静默检查一次
- 补齐中英文案

验证:
- swift build 通过,swift test 182 个测试全过
- 用真实分享页 HTML 与列表 JSON 验证参数提取与版本解析(-b22 / -build21 两种命名,同版本 dmg 优先)
- 本地化校验脚本通过

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
# Conflicts:
#	macos/Sources/WeChatBridgeApp/LanzouUpdateChecker.swift
- Package.swift 平台增加 .iOS(.v17)
- FilePasteboard 的 NSPasteboard 方法仅在 AppKit 可用时编译,shellLine/shellQuoted 两端共用
- AppGroup.sharedRoot 在 iOS 上回退到本进程 Application Support,仅供测试与预览
- InboxSignal 在 iOS 上改用 Darwin 通知中心
- PointerPlacement 显式导入 CoreGraphics

验证:iOS 17 模拟器 SDK 以 -application-extension 类型检查通过;macOS swift test 186 项通过。
- ios-feature-baseline:以 macOS 版为基准逐项对照 iOS 可行性,记录真机实测结论与各 Agent 接收 ZIP 情况
- ios-relay-v1:中转站第一版的页面、流程、Core 复用、工程结构与开发顺序
- assets/ios-验证素材:真机截图与 Yoink 录屏抽帧
…ript

Targets WeChatBridgeiOS / WeChatBridgeiOSShare / WeChatBridgeiOSTests; spec §5.3 and §8.3 now use these names.
Share extension saves WeChat exports into the App Group inbox. The app lists them, reads them back as chats, and delivers to AI apps (ZIP or TXT+images via the share sheet), Obsidian or a folder, with scenes, collections and onboarding. 28 unit tests.
- Send button reads 已发送 once every group is out, not 继续发送第 2/1 组.
- Target grid order is fixed while the sheet is open.
- Tab bar hides in edit mode so 合并投递 / 删除 are reachable.
- Subfolder fields in settings are labelled.
Redacted screenshots of the signing setup and WeChat's open-in entry;
acceptance record notes the device environment is ready.
A ZIP whose text is not in chat-record layout (a single exported message)
now shows as a text card with its full text, and delivers under its own
name; only archives without readable text stay 解析失败. The summary now
unpacks only the archive it picks, so a text ZIP no longer pollutes the
batch's unpack folder.
…d text

豆包 takes the files from a share but not its text (R2 on device), so the
pre-share hint adds 提示词已复制,在输入框长按粘贴 and stays up longer, and
the closing toast repeats it.
…oating detail actions

- Relay list: rounded cards with a kind badge (chat / text / unparsed); no tag
  while undelivered, grey 已投递 · target after; text cards fold links to their
  domain and show the received time.
- Delivery panel: full-height solid sheet; target grid uses the real app logos
  from shared/AppLogos with a ring and check on the selection; preview lists
  each file with its size and names what is left out.
- Detail: tab bar hidden, floating action capsule, image tile so tiny or
  transparent images stay visible, stable per-speaker colours.
- WeChat-green accent colour; share extension and app no longer show the raw
  App Group id when the container is missing.
The share extension posts a local notification after saving. Tapping it
opens the app, preselects the last target and presents the share sheet;
long-press offers the three most recent targets. Toggle in Settings.
Delivering to another app now leaves a 微信流 entry in the Dynamic Island and on the lock screen: back to the chat, copy the prompt again, or dismiss. Long-pressing a relay card offers the recent targets, the full panel, add to collection and delete.
千问 kept only the images when one share mixed them with 聊天记录.txt.
A temporary picker in the delivery sheet, shown only for 千问, until device tests pick the route that keeps both the chat and the images in one share.
Device tests: TXT plus images and images-first both arrived as images only, text plus images ended in 「格式不支持」, one PDF arrived whole. Drops the trial picker.
- Export (Photos save and 微信流 folder) runs once the share went through;
  only the Photos permission is asked before the sheet.
- Each merged chat stages its media apart and gets a unique folder name.
- Media Photos refuses or has no permission for go into the chat's folder.
- The folder is built aside and replaces the old one only when complete.
- The package records which images the PDF drew; undecodable ones and
  loose image items are exported instead of lost.
- Share the folder-name fallback between the relay list and the sheet.
- Bundle the privacy manifest in the widget extension, whose Live Activity
  code reads UserDefaults, and declare CA92.1 for the app's own defaults.
- Declare ITSAppUsesNonExemptEncryption = false.
- Set MARKETING_VERSION and CURRENT_PROJECT_VERSION once at project level.
- 新增动作扩展「分批收集到微信流」,收下的批次自动并入当前收集,回执显示第几批
- 复制每批最后一句文字到剪贴板,便于回微信搜索定位下一批;普通分享正好 100 条时也复制
- 中转站:100 条提示、收集卡片「继续收集 / 完成并投递」;收集详情:怎么接着收
@Hiwoniu
Hiwoniu merged commit d0833fb into main Oct 27, 2026
2 checks passed
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.

2 participants