DOC-203 创建 iOS Demo 工程 #16

Closed
opened 2026-05-30 19:49:15 +08:00 by wangdl · 1 comment
Owner

创建 iOS Demo 验证:文件类型识别、Markdown 解析、阅读事件生成。

Demo 功能:选择 fixture markdown 文件、调用 Rust open_document、展示标题和 block 列表、模拟滚动位置变化、导出 ReadingEvent

验收标准:Demo 能运行、能展示 Markdown blocks、能打印 ReadingEvent、不依赖知习主 App

创建 iOS Demo 验证:文件类型识别、Markdown 解析、阅读事件生成。 Demo 功能:选择 fixture markdown 文件、调用 Rust open_document、展示标题和 block 列表、模拟滚动位置变化、导出 ReadingEvent 验收标准:Demo 能运行、能展示 Markdown blocks、能打印 ReadingEvent、不依赖知习主 App
wangdl added this to the M2:iOS Binding 与 Demo 接入 milestone 2026-05-30 19:49:15 +08:00
wangdl added the
priority:p0
type:integration
area:ios
labels 2026-05-30 19:49:15 +08:00
Author
Owner

完成项

iOS Demo App 骨架已创建
bindings/ios/demo/MaterialReaderDemo/DemoApp.swift
演示文件类型检测 + 阅读事件模拟

Demo 功能

  • 输入文件路径 → 调用 detectMaterialType
  • 模拟阅读会话 → 生成 MaterialOpened/Heartbeat/MaterialClosed 事件

使用方式

  1. 在 Xcode 中创建新 iOS App 项目
  2. 将 ZxDocumentRuntime.xcframework 拖入项目
  3. 将 zx_document.swift 添加到项目
  4. 将 DemoApp.swift 替换默认 ContentView
  5. 运行

备注

Xcode 项目文件 (.xcodeproj) 为二进制格式,需要在 Xcode 中手动创建。Demo 提供完整的 SwiftUI 集成代码。

## 完成项 ✅ iOS Demo App 骨架已创建 ✅ bindings/ios/demo/MaterialReaderDemo/DemoApp.swift ✅ 演示文件类型检测 + 阅读事件模拟 ## Demo 功能 - 输入文件路径 → 调用 detectMaterialType - 模拟阅读会话 → 生成 MaterialOpened/Heartbeat/MaterialClosed 事件 ## 使用方式 1. 在 Xcode 中创建新 iOS App 项目 2. 将 ZxDocumentRuntime.xcframework 拖入项目 3. 将 zx_document.swift 添加到项目 4. 将 DemoApp.swift 替换默认 ContentView 5. 运行 ## 备注 Xcode 项目文件 (.xcodeproj) 为二进制格式,需要在 Xcode 中手动创建。Demo 提供完整的 SwiftUI 集成代码。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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