DOC-FULL-030 P1 | 文档:iOS 接入指南 【status:partial】 #79

Closed
opened 2026-06-07 11:33:19 +08:00 by wangdl · 2 comments
Owner

引入 XCFramework/Swift binding/创建 ReadingTarget/start session/触发事件/export ack events/解析 Markdown/创建 NoteAnchor/常见错误

M-DOC-FULL 里程碑 issue。详见设计文档。

## 引入 XCFramework/Swift binding/创建 ReadingTarget/start session/触发事件/export ack events/解析 Markdown/创建 NoteAnchor/常见错误 M-DOC-FULL 里程碑 issue。详见设计文档。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:33:19 +08:00
wangdl changed title from DOC-FULL-030 P1 | 文档:iOS 接入指南 to DOC-FULL-030 P1 | 文档:iOS 接入指南 【status:partial】 2026-06-07 19:15:07 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: docs/ios-integration.md 存在(V1)。需更新到 V2。blocked-by:doc-v2-core

状态: status:partial
工作类型: work:docs

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: docs/ios-integration.md 存在(V1)。需更新到 V2。blocked-by:doc-v2-core **状态**: status:partial **工作类型**: work:docs
Author
Owner

完成报告

更新内容

docs/ios-integration.md 新增 V2 API 章节:

  • ReadingMaterialRef 创建 + startSession 流程
  • 5 种事件推送(MaterialOpened/PositionChanged/Heartbeat/MarkedAsRead/MaterialClosed)
  • Export + Ack 完整流程(含 iOS 补充字段:readingTargetType/platform/appVersion/timezone)
  • App 启动 crash recovery(reloadStaleEvents)
  • 搜索 + 笔记锚点(search→createAnchor→restorePosition)
  • PDF/EPUB 元数据读取
  • Office 预览策略查询

代码证据

let sessionId = try startReadingSessionV2(material: material, timestampMs: timestamp)
let opened = try pushMaterialOpenedV2(sessionId: sessionId, ...)
let events = exportPendingEventsV2(limit: 100, timestampMs: now())
ackEventsV2(eventIds: ids)
let anchor = createNoteAnchorFromSearch(materialId: "mat_001", result: firstResult)
## 完成报告 ### 更新内容 `docs/ios-integration.md` 新增 V2 API 章节: - ReadingMaterialRef 创建 + startSession 流程 - 5 种事件推送(MaterialOpened/PositionChanged/Heartbeat/MarkedAsRead/MaterialClosed) - Export + Ack 完整流程(含 iOS 补充字段:readingTargetType/platform/appVersion/timezone) - App 启动 crash recovery(reloadStaleEvents) - 搜索 + 笔记锚点(search→createAnchor→restorePosition) - PDF/EPUB 元数据读取 - Office 预览策略查询 ### 代码证据 ```swift let sessionId = try startReadingSessionV2(material: material, timestampMs: timestamp) let opened = try pushMaterialOpenedV2(sessionId: sessionId, ...) let events = exportPendingEventsV2(limit: 100, timestampMs: now()) ackEventsV2(eventIds: ids) let anchor = createNoteAnchorFromSearch(materialId: "mat_001", result: firstResult) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#79
No description provided.