83 lines
3.0 KiB
Markdown
83 lines
3.0 KiB
Markdown
# 技术栈
|
||
|
||
**分析日期:** 2026-05-21
|
||
|
||
## 语言
|
||
|
||
**主要语言:**
|
||
- Swift(Podspec 声明 Swift 5.10)— SDK 实现在 `Sources/RDReaderView/**/*.swift`,示例 App 在 `ReadViewDemo/ReadViewDemo/*.swift`。
|
||
|
||
**次要语言:**
|
||
- Objective-C — 主要来自示例工程 vendored 的 CocoaPods 依赖源码 `ReadViewDemo/Pods/**`(例如 DTFoundation/DTCoreText)。
|
||
|
||
## 运行环境
|
||
|
||
**平台:**
|
||
- iOS — 最低 iOS 15.x(SDK 声明 iOS 15.0;Demo/Podfile 常见为 15.6)。
|
||
|
||
**使用到的 Apple Framework(不完全列举):**
|
||
- UIKit — `Sources/RDReaderView/**` 内的 UI 与控制器实现。
|
||
- WebKit — EPUB Web 渲染相关配置见 `Sources/RDReaderView/EPUBCore/RDEPUBWebView+Configuration.swift`。
|
||
- CoreText — 文本分页/渲染支持(`Sources/RDReaderView/EPUBTextRendering/**`)。
|
||
- Foundation — 文件系统/持久化等基础能力(`Sources/RDReaderView/**`)。
|
||
|
||
## 依赖管理
|
||
|
||
**CocoaPods:**
|
||
- SDK 以 Podspec 形式发布:`RDReaderView.podspec`。
|
||
- 示例工程通过 CocoaPods 集成:`ReadViewDemo/Podfile`、`ReadViewDemo/Podfile.lock`。
|
||
- Lockfile 记录的 CocoaPods 版本:1.16.2(`ReadViewDemo/Podfile.lock`)。
|
||
|
||
**未检测到:**
|
||
- Swift Package Manager(未发现 `Package.swift`)
|
||
- Carthage(未发现 `Cartfile`)
|
||
|
||
## 框架与第三方库
|
||
|
||
**核心库(本仓库):**
|
||
- `RDReaderView`(阅读器 UI + EPUB/TXT 阅读能力)— `Sources/RDReaderView/**`。
|
||
|
||
**Pod 声明的第三方依赖:**
|
||
- `ZIPFoundation (~> 0.9)` — EPUB 压缩包读取/解压与解析。
|
||
- `DTCoreText` — HTML → NSAttributedString 渲染(在 `#if canImport(DTCoreText)` 条件下使用)。
|
||
- `SnapKit` — Auto Layout 约束封装。
|
||
- `SSAlertSwift` — 弹窗/提示 UI 工具。
|
||
|
||
## 构建与开发工具
|
||
|
||
**Xcode 工程(示例 App):**
|
||
- Workspace/Project:`ReadViewDemo/ReadViewDemo.xcworkspace`、`ReadViewDemo/ReadViewDemo.xcodeproj`。
|
||
|
||
**CocoaPods post_install 构建设置(仓库内配置):**
|
||
- 在 Pods 与用户工程上统一设置 `IPHONEOS_DEPLOYMENT_TARGET = 15.6` 和 `ENABLE_USER_SCRIPT_SANDBOXING = NO` — 见 `Podfile`、`ReadViewDemo/Podfile`。
|
||
|
||
## 资源与素材
|
||
|
||
**资源 bundle:**
|
||
- Podspec 声明了 `RDReaderViewAssets` 资源 bundle,来源为 `Sources/RDReaderView/Resources/**`(`RDReaderView.podspec`)。
|
||
|
||
## 平台要求
|
||
|
||
**开发:**
|
||
- 需要 macOS + Xcode(iOS SDK)构建 Demo workspace/project(`ReadViewDemo/ReadViewDemo.xcworkspace`)。
|
||
- 需要 CocoaPods 安装 Demo 依赖(`ReadViewDemo/Podfile.lock` 体现了 CocoaPods 使用)。
|
||
|
||
**发布/分发:**
|
||
- 以 CocoaPod 形式分发(`RDReaderView.podspec`)。
|
||
|
||
## Evidence(关键证据)
|
||
|
||
检查过的关键文件:
|
||
- `RDReaderView.podspec`
|
||
- `Podfile`
|
||
- `ReadViewDemo/Podfile`
|
||
- `ReadViewDemo/Podfile.lock`
|
||
- `ReadViewDemo/ReadViewDemo.xcodeproj/project.pbxproj`
|
||
- `Sources/RDReaderView/EPUBCore/RDEPUBWebView+Configuration.swift`
|
||
- `Sources/RDReaderView/EPUBCore/RDEPUBParser+Archive.swift`
|
||
- `Sources/RDReaderView/EPUBTextRendering/RDEPUBDTCoreTextRenderer.swift`
|
||
|
||
---
|
||
|
||
*技术栈分析:2026-05-21*
|