DOC-302e XCFramework 重建 + Xcode 编译验证 #34

Closed
opened 2026-06-02 22:19:30 +08:00 by wangdl · 2 comments
Owner

目标

重建 XCFramework 并在 Xcode 中验证 iOS 项目编译 + 链接通过。

步骤

  1. bash scripts/build-ios.sh 重建 XCFramework
  2. 复制新的 zx_document.swift 到 iOS 项目
  3. 复制新的 ZxDocumentRuntime.xcframework 到 iOS 项目
  4. Xcode build 验证:0 编译错误 + 0 链接错误
  5. 验证 nm 输出中有全部 uniffi_zx_document_ffi_fn_func_* 符号

验收标准

# 编译
xcodebuild -scheme AIStudyApp -sdk iphonesimulator build
# → ** BUILD SUCCEEDED **

# 符号检查
nm libzx_document_ffi.a | grep "uniffi_zx_document_ffi_fn_func_detect_material_type"
# → 有输出(C ABI 符号存在)

依赖

  • 依赖 DOC-302a + DOC-302b + DOC-302c

注意

  • 这是整个 DOC-302 的最终验证任务
  • 如果仍失败,需要回到 302a 排查类型 derive 问题
## 目标 重建 XCFramework 并在 Xcode 中验证 iOS 项目编译 + 链接通过。 ## 步骤 1. `bash scripts/build-ios.sh` 重建 XCFramework 2. 复制新的 `zx_document.swift` 到 iOS 项目 3. 复制新的 `ZxDocumentRuntime.xcframework` 到 iOS 项目 4. Xcode build 验证:0 编译错误 + 0 链接错误 5. 验证 `nm` 输出中有全部 `uniffi_zx_document_ffi_fn_func_*` 符号 ## 验收标准 ```bash # 编译 xcodebuild -scheme AIStudyApp -sdk iphonesimulator build # → ** BUILD SUCCEEDED ** # 符号检查 nm libzx_document_ffi.a | grep "uniffi_zx_document_ffi_fn_func_detect_material_type" # → 有输出(C ABI 符号存在) ``` ## 依赖 - 依赖 DOC-302a + DOC-302b + DOC-302c ## 注意 - 这是整个 DOC-302 的最终验证任务 - 如果仍失败,需要回到 302a 排查类型 derive 问题
wangdl added this to the M3:iOS 主 App 资料阅读闭环 milestone 2026-06-02 22:19:30 +08:00
wangdl added the
type:integration
area:ffi
area:ios
labels 2026-06-02 22:19:30 +08:00
Author
Owner

验证通过 (2026-06-03)

Clean 重建

  • cargo cleanbash scripts/build-ios.sh 全过程成功
  • 符号检查:17 个 C ABI 符号全部存在
  • 补丁自动应用,Swift 文件生成完整

Xcode 验证

  • xcodebuild -scheme AIStudyApp -sdk iphonesimulator build
  • BUILD SUCCEEDED,0 编译错误 + 0 链接错误

Rust 测试

  • cargo test: 58 passed, 0 failed

产物

  • bindings/ios/ZxDocumentRuntime.xcframework — 已重建
  • bindings/ios/generated/zx_document.swift — 已生成 + 补丁
  • UIKit 项目可 link libzx_document_ffi.a,Swift 可调全部 12 个 API
## 验证通过 (2026-06-03) ### Clean 重建 - `cargo clean` → `bash scripts/build-ios.sh` 全过程成功 - 符号检查:17 个 C ABI 符号全部存在 - 补丁自动应用,Swift 文件生成完整 ### Xcode 验证 - `xcodebuild -scheme AIStudyApp -sdk iphonesimulator build` - **BUILD SUCCEEDED**,0 编译错误 + 0 链接错误 ### Rust 测试 - `cargo test`: 58 passed, 0 failed ### 产物 - `bindings/ios/ZxDocumentRuntime.xcframework` — 已重建 - `bindings/ios/generated/zx_document.swift` — 已生成 + 补丁 - UIKit 项目可 link libzx_document_ffi.a,Swift 可调全部 12 个 API
Author
Owner

关闭

DOC-302e 已完成 — XCFramework 存在且可链接

## 关闭 DOC-302e 已完成 — XCFramework 存在且可链接
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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