expo-harmony-toolkit 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,11 @@
2
2
 
3
3
  这份指南适用于仓库内的 `examples/official-ui-stack-sample`。
4
4
 
5
- 它是 `v1.5.0` 的主 sample,承担以下验证职责:
5
+ 它仍然是当前唯一的 verified UI-stack sample,承担以下验证职责:
6
6
 
7
- - `expo-router`、`expo-linking`、`expo-constants`
7
+ - `expo-router`
8
+ - `expo-linking`
9
+ - `expo-constants`
8
10
  - `react-native-svg`
9
11
  - `react-native-reanimated`
10
12
  - `doctor -> init -> bundle -> build-hap` 的完整工具链
@@ -25,12 +27,6 @@ pnpm run harmony:doctor:strict
25
27
  pnpm run harmony:init
26
28
  pnpm run harmony:sync-template
27
29
  pnpm run harmony:bundle
28
- ```
29
-
30
- 如果本机 DevEco / Harmony SDK 已就绪,还可以继续:
31
-
32
- ```bash
33
- pnpm run harmony:env
34
30
  pnpm run harmony:build:debug
35
31
  ```
36
32
 
@@ -38,13 +34,29 @@ pnpm run harmony:build:debug
38
34
 
39
35
  打开 App 后,至少验证:
40
36
 
41
- - 首页能正常启动
42
- - 顶部信息区能看到 `Constants.expoConfig?.name`
37
+ - 首页能看到 `Constants.expoConfig?.name`
38
+ - 首页能看到当前 pathname、observed URL 和 generated details URL
43
39
  - 页面能展示 SVG 圆环图形
44
40
  - 点击 motion rail 时有可见位移、旋转与回弹
45
41
  - 点击 `Open details route` 后能跳到 `/details`
46
42
  - 在 `/details` 点击返回后能回首页
47
- - 动画和路由交互不会互相破坏
43
+ - 动画、路由、SVG 不会互相破坏
44
+
45
+ ## Release 路径
46
+
47
+ 如果要继续验证 release 构建,先准备本地签名覆盖文件:
48
+
49
+ ```bash
50
+ mkdir -p .expo-harmony
51
+ $EDITOR .expo-harmony/signing.local.json
52
+ pnpm run harmony:env
53
+ pnpm run harmony:build:release
54
+ ```
55
+
56
+ 说明:
57
+
58
+ - `.expo-harmony/signing.local.json` 是本地 signing 入口
59
+ - signing 缺失时,release 构建应明确失败,而不是假成功
48
60
 
49
61
  ## Harmony sidecar 预期产物
50
62
 
@@ -61,13 +73,6 @@ pnpm run harmony:build:debug
61
73
  - `reanimated` 与 `svg` 会进入 `RNOHPackagesFactory.*` 与 `autolinking.cmake`
62
74
  - `reanimated` 与 `svg` 会作为 `.har` 依赖出现在 `harmony/oh-package.json5`
63
75
 
64
- ## DevEco 手动验证
65
-
66
- - 用 DevEco Studio 打开 `examples/official-ui-stack-sample/harmony`
67
- - 选择 `entry` module
68
- - 确认 App 可运行
69
- - 确认 `Build Debug Hap(s)` 成功
70
-
71
76
  如果需要看更完整的构建与发布说明,继续阅读:
72
77
 
73
78
  - [CLI 构建指南](./cli-build.md)
package/docs/roadmap.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # 路线图
2
2
 
3
+ ## 收官定义
4
+
5
+ 这个项目的“完美落幕”不再定义为“一次性完美支持任意 Expo 项目”。
6
+
7
+ 新的收官定义是:
8
+
9
+ - 在 `Managed/CNG Expo` 主线下,主流官方 Expo 能力可稳定分析、可 bundle、可 debug/release 验证、可交付
10
+ - `latest` 只承诺已经完成完整验收的 `verified` 能力
11
+ - 长尾第三方 native module 不再挤进同一条公开承诺,而是进入 `extension model`
12
+
13
+ 因此,路线会分成两段:
14
+
15
+ - `Core Expo Coverage`:主线收官点
16
+ - `Long-tail Extension`:收官后的持续扩展模型
17
+
3
18
  ## 已完成里程碑
4
19
 
5
20
  ### v0.1 迁移工具包
@@ -39,69 +54,82 @@
39
54
  - 共享 Harmony permission 生成链
40
55
  - 新增 `official-native-capabilities-sample`
41
56
 
57
+ ### v1.7 Device APIs Batch B + Capability Onboarding
58
+
59
+ - `expo-location`、`expo-camera` 进入 `preview`
60
+ - Batch A+B preview capability 进入统一 sample / fixture / 文档 / 验收模型
61
+ - 形成 `doctor -> sync-template -> bundle -> build-hap --mode debug` 的 preview onboarding baseline
62
+ - 公开结论保持保守:可接入,不等于已 verified
63
+
42
64
  ## 当前主线
43
65
 
44
- ### v1.7 Device APIs Batch B + Capability Onboarding
66
+ ### v1.8 Capability Graduation + Fast Track Release
45
67
 
46
- 目标:把第二批高频设备能力推进到 `preview`,并把 capability 接入、验证、晋升流程产品化。
68
+ 目标日期:`2026-05-15`
47
69
 
48
- - `expo-location`、`expo-camera` 进入 `preview`
49
- - 共用 managed capability bridge 行为:
50
- 可 `doctor`、可 `sync-template`、可 `bundle`、可 `build-hap --mode debug`
51
- - `expo-location` 至少覆盖:
52
- 前台权限、当前定位、`watchPosition`
53
- - `expo-camera` 至少覆盖:
54
- 相机权限、预览 surface、单次拍照入口
55
- - `official-native-capabilities-sample` 扩成 Batch A+B 统一验证入口
56
- - 为 Batch A+B 维护 fixture、sample、文档、验收记录同步更新
57
- - `expo-file-system`、`expo-image-picker` 只有在同版补齐完整证据时才晋升 `verified`
70
+ 目标:优先把“已经接入的 preview 能力”推进到可晋升状态,而不是只继续堆新模块数量。
58
71
 
59
- ### v1.8 Verification and Release Hardening
72
+ - 建立 capability graduation 流水线:
73
+ `doctor --strict`、`doctor --target-tier preview`、`sync-template`、`bundle`、`build-hap --mode debug`、device acceptance、release acceptance
74
+ - `DoctorReport`、`toolkit-config.json`、support matrix 全部引入 `runtimeMode` 与 `evidence`
75
+ - `expo-file-system`、`expo-image-picker` 优先冲刺 verified 所需的真 runtime 与 device 证据
76
+ - `expo-location`、`expo-camera` 从 throw-only shim 推进到可验证的 adapter-backed preview
77
+ - 发布节奏改成双轨:
78
+ `latest` 只承接完整验收的 verified 能力,`next` 承接 preview fast track
60
79
 
61
- 目标:把 capability coverage release reliability 合并成可重复执行的 gate。
80
+ ### v1.9 App Foundation Modules
62
81
 
63
- - 完整 deep link lifecycle 验收
64
- - 更强的 signing / profile / release lint
65
- - 快速 smoke 与 capability acceptance 双层验证
66
- - 具备 Harmony 工具链的 runner 上增加 debug HAP 真构建 gate
67
- - capability promotion gate 固化到 sample、fixture、build、device acceptance 流程
68
- - release gate 只放在有签名环境的专用流程
82
+ 目标日期:`2026-07-31`
69
83
 
70
- ### v1.9 Core Expo Production Modules
84
+ 目标:优先补齐最能解锁真实 Managed/CNG Expo 项目的基础官方模块。
71
85
 
72
- 目标:优先补齐能解锁最多真实项目的 Expo 官方生产能力,而不是先追长尾第三方 native package。
86
+ - 依序接入:`expo-secure-store`、`expo-device`、`expo-asset`、`expo-clipboard`、`expo-haptics`
87
+ - 每个能力都必须同时具备:
88
+ fixture、sample route、doctor、sync-template、bundle、debug build、acceptance 记录
89
+ - 完成 `expo-location`、`expo-camera` verified 晋升
90
+ - 如果某项能力无法在同版晋升,则必须明确记录阻塞点与缺失证据,而不是模糊停留
73
91
 
74
- - 存储、安全、设备信息、资产、多媒体、剪贴板、触感等高频官方模块
75
- - 每个能力都必须沿用 v1.7 建立的 onboarding / acceptance 模型
76
- - 继续保持单一 `verified` runtime matrix,对外承诺不膨胀
92
+ ### v2.0 Managed/CNG Core Expo Coverage
77
93
 
78
- ### v2.0 Core Expo Full Coverage
94
+ 目标日期:`2026-10-31`
79
95
 
80
- 定义:在单一 `verified` runtime matrix 下,把“核心 Expo 生产项目”推进到完整可用、可构建、可交付。
96
+ 定义:在单一 `verified` runtime matrix 下,把主流 `Managed/CNG Expo` 生产项目推进到完整可用、可构建、可交付。
81
97
 
82
- - 官方 Expo 常用能力达到明确公开支持
83
- - 主流 UI stack、常见设备 API、常见交付链形成完整故事
84
- - 高频能力达到 `verified`
85
- - 具备明确 release readiness 路径
86
- - roadmap 对外叙事从“能跑 sample”升级为“核心 Expo 项目可稳定交付”
98
+ - 官方高频 Expo 能力覆盖达到可交付水平
99
+ - `latest` 只包含完整验收能力
100
+ - release readiness 路径完整闭环
101
+ - roadmap 对外叙事从“sample 可跑”升级为“核心 Managed/CNG Expo 项目可稳定交付”
102
+
103
+ 这是最早可以对外宣告“主目标收官”的时间点。
87
104
 
88
105
  ### v2.x Long-tail Native Module Extension
89
106
 
90
- 目标:在完成核心 Expo 全覆盖后,再去逼近“任何 Expo 项目都能打包成鸿蒙 APP”的长期目标。
107
+ 目标日期:`2027-03-31` 前启动
108
+
109
+ 目标:把“任何 Expo 项目都能打包成鸿蒙 APP”从内建承诺,转成有边界、可扩展、可持续维护的 extension model。
91
110
 
92
- - 引入长尾第三方 native module extension / onboarding 模型
93
- - 为第三方适配建立 capability registry、adapter、fixture、acceptance 规范
94
- - 不对未知或未验证 native package 提前给出正式可用承诺
111
+ - 引入第三方 native module extension / onboarding 模型
112
+ - 建立 capability registry、adapter、fixture、acceptance 规范
113
+ - 把未知或未验证第三方包从“公开承诺”切换为“显式扩展”
114
+ - 不对未验证长尾模块提前给出正式可用声明
95
115
 
96
116
  ## 长期方向
97
117
 
98
- - 先做到 `Core Expo Full Coverage`
99
- - 再做到 `Long-tail Native Module Coverage`
100
- - “推进速度”与“完全可用”并行,而不是先扩承诺再补证据
118
+ - 先做到 `Managed/CNG Core Expo Coverage`
119
+ - 再通过 `Long-tail Native Module Extension` 逼近“任意 Expo 项目”
120
+ - 推进速度依赖 `next` 快速收敛反馈,但公开承诺继续由 `latest` 控制
101
121
 
102
122
  ## 路线约束
103
123
 
104
- - `v2.0` 前继续坚持单一 verified runtime matrix,不提前开启多 Expo / RNOH 并行正式承诺
124
+ - `v2.0` 前继续坚持单一 verified runtime matrix
125
+ - `v2.0` 前不把 bare Expo 拉进主线,只保留 `Managed/CNG`
105
126
  - `doctor --strict` 继续只代表 `verified`
127
+ - `latest` 只承诺完整验收的 `verified` 能力
128
+ - `next` 可以承接 preview fast track,但不得伪装成 verified
106
129
  - roadmap、support matrix、README、acceptance 记录必须在同一 PR 同步更新
107
130
  - 没有 sample、fixture、文档、构建证据、人工验收记录的能力,不得晋升到 `verified`
131
+
132
+ ## 风险与顺延条件
133
+
134
+ - 收官前提是从 `2026-03-31` 起持续具备 Harmony 模拟器或真机验证条件,并保持周级别验收节奏
135
+ - 如果 Expo SDK / RNOH 在 `2026-05-15` 前发生大矩阵漂移,`v2.0` 收官点应顺延到 `2026-12-31` 左右
@@ -1,10 +1,10 @@
1
1
  # v1.7 支持矩阵
2
2
 
3
- `v1.7` 延续并扩张 tiered support model
3
+ `v1.7` 继续采用 tiered support model,但从现在开始把“层级”与“晋升距离”拆开表达:
4
4
 
5
- - 一条 `verified` 正式承诺矩阵
6
- - 一组 `preview` 预览能力
7
- - 一组 `experimental` 探索能力
5
+ - `supportTier` 表示公开承诺层级
6
+ - `runtimeMode` 表示当前运行时接入形态:`shim`、`adapter`、`verified`
7
+ - `evidence` 表示距离 verified 还缺哪些证据格
8
8
 
9
9
  `doctor --strict` 继续只代表 `verified`。
10
10
 
@@ -29,8 +29,8 @@
29
29
 
30
30
  | 层级 | 含义 | `doctor --strict` | `doctor --target-tier <tier>` |
31
31
  | --- | --- | --- | --- |
32
- | `verified` | 已进入正式公开承诺,要求完整样例、构建、人工验收 | 允许 | 允许 |
33
- | `preview` | 已具备 managed bridge / bundle / debug build 路径,但运行时仍待完整验收 | 阻断 | `preview` / `experimental` 允许 |
32
+ | `verified` | 已进入正式公开承诺,要求完整样例、构建、设备与 release 验收 | 允许 | 允许 |
33
+ | `preview` | 已有 managed adapter / bundle / debug build 路径,但仍未完成 verified 证据闭环 | 阻断 | `preview` / `experimental` 允许 |
34
34
  | `experimental` | 允许继续探索,但预期会有 bridge 漂移或设备侧缺口 | 阻断 | 仅 `experimental` 允许 |
35
35
  | `unsupported` | 不在 catalog 内,toolkit 无法给出可靠承诺 | 阻断 | 阻断 |
36
36
 
@@ -54,27 +54,56 @@
54
54
  - `@react-native-oh-tpl/react-native-reanimated`
55
55
  - `@react-native-oh-tpl/react-native-svg`
56
56
 
57
+ ## Capability Telemetry
58
+
59
+ 所有 capability 从现在开始都同时公开:
60
+
61
+ - `supportTier`
62
+ - `runtimeMode`
63
+ - `evidence.bundle`
64
+ - `evidence.debugBuild`
65
+ - `evidence.device`
66
+ - `evidence.release`
67
+
68
+ 判读规则:
69
+
70
+ - `runtimeMode=shim`:说明当前还在桥接或占位阶段,即使 bundle / debug build 已完成,也不应宣称 verified
71
+ - `runtimeMode=adapter`:说明已经进入真实适配路径,但仍缺少某些验收证据
72
+ - `runtimeMode=verified`:说明能力已进入正式承诺,且证据闭环完成
73
+
74
+ 为了避免把“只差真机”与“当前子 API 还没实现到位”混在一起,`v1.7.x` 文档额外使用以下标记:
75
+
76
+ - `🟡 可用待晋升`:当前子集已经有可信实现,样例和模拟器路径可用;下一步主要缺真机 / release 证据
77
+ - `⛔ 完全不支持`:能力仍在 catalog 外,或根本不在当前公开承诺范围
78
+
57
79
  ## Preview 能力
58
80
 
59
- | Expo 能力 | 当前层级 | Harmony 依赖方向 | 受管权限 | 官方 sample route |
60
- | --- | --- | --- | --- | --- |
61
- | `expo-file-system` | `preview` | `react-native-fs` | 无新增必需权限 | `/file-system` |
62
- | `expo-image-picker` | `preview` | `react-native-image-picker` + `react-native-permissions` | `ohos.permission.CAMERA`、`ohos.permission.READ_IMAGEVIDEO` | `/image-picker` |
63
- | `expo-location` | `preview` | `@react-native-community/geolocation` + `react-native-permissions` | `ohos.permission.LOCATION`、`ohos.permission.APPROXIMATELY_LOCATION` | `/location` |
64
- | `expo-camera` | `preview` | `react-native-camera-kit` + `react-native-permissions` | `ohos.permission.CAMERA` | `/camera` |
81
+ | Expo 能力 | 当前层级 | runtimeMode | evidence | Harmony 依赖方向 | 受管权限 | 官方 sample route |
82
+ | --- | --- | --- | --- | --- | --- | --- |
83
+ | `expo-file-system` | `preview` | `adapter` | `bundle=yes, debugBuild=yes, device=yes, release=no` | toolkit-managed sandbox file adapter | 无新增必需权限 | `/file-system` |
84
+ | `expo-image-picker` | `preview` | `adapter` | `bundle=yes, debugBuild=yes, device=yes, release=no` | toolkit-managed Harmony media picker adapter | `ohos.permission.CAMERA`、`ohos.permission.MICROPHONE`、`ohos.permission.READ_IMAGEVIDEO` | `/image-picker` |
85
+ | `expo-location` | `preview` | `adapter` | `bundle=yes, debugBuild=yes, device=yes, release=no` | toolkit-managed `@ohos.geoLocationManager` TurboModule | `ohos.permission.LOCATION`、`ohos.permission.APPROXIMATELY_LOCATION`、`ohos.permission.LOCATION_IN_BACKGROUND`、`ohos.permission.ACCELEROMETER` | `/location` |
86
+ | `expo-camera` | `preview` | `adapter` | `bundle=yes, debugBuild=yes, device=yes, release=no` | toolkit-managed embedded camera preview + control TurboModule | `ohos.permission.CAMERA`、`ohos.permission.MICROPHONE` | `/camera` |
65
87
 
66
88
  说明:
67
89
 
68
- - preview 能力会进入 `DoctorReport.capabilities`
69
- - toolkit 会生成对应 Metro alias shim,确保 preview 项目能稳定 `bundle` `build-hap --mode debug`
70
- - preview 不等于 verified;没有运行时与设备侧证据前,不可对外宣称完全可用
90
+ - 当前四项 preview capability 都已经完成 preview baseline 的 bundle / debug build / route walkthrough
91
+ - 四项 preview capability 都已经进入 `adapter` 路径;`device=yes` 只表示已有样例侧与运行时路径证据,仍不代表 verified release-ready
92
+ - `expo-file-system`
93
+ - `🟡` 当前主路径是 UTF-8/base64 sandbox I/O、append/partial read、`getInfoAsync({ md5: true })` 与 `downloadAsync`
94
+ - `expo-image-picker`
95
+ - `🟡` 当前主路径是单选、多选、mixed library selection、system photo/video capture、pending result 恢复,以及 image/video metadata 展示
96
+ - `expo-location`
97
+ - `🟡` 当前主路径是 foreground/background permission、current / watch、heading snapshot/watch、geocode / reverse-geocode
98
+ - `expo-camera`
99
+ - `🟡` 当前主路径是 embedded preview、preview pause/resume、still capture、video recording 与 microphone permission
71
100
 
72
101
  ## Experimental 能力
73
102
 
74
- | Expo 能力 / 依赖 | 当前层级 | 说明 |
75
- | --- | --- | --- |
76
- | `expo-notifications` | `experimental` | 服务链路与交付故事未打通 |
77
- | `react-native-gesture-handler` | `experimental` | 继续保留本地探索 shim,但不在公开 verified 矩阵内 |
103
+ | Expo 能力 / 依赖 | 当前层级 | runtimeMode | evidence | 说明 |
104
+ | --- | --- | --- | --- | --- |
105
+ | `expo-notifications` | `experimental` | `shim` | `bundle=no, debugBuild=no, device=no, release=no` | 服务链路与交付故事未打通 |
106
+ | `react-native-gesture-handler` | `experimental` | matrix 外本地探索 | matrix 外 | 继续保留本地探索 shim,但不在公开 verified 矩阵内 |
78
107
 
79
108
  ## UI Stack 配对规则
80
109
 
@@ -111,12 +140,18 @@ expo-harmony doctor --project-root /path/to/app --target-tier preview
111
140
  - `--target-tier preview`:允许 verified + preview
112
141
  - `--target-tier experimental`:允许 verified + preview + experimental
113
142
 
114
- `doctor-report.json` 继续保留现有稳定字段,并新增:
143
+ `doctor-report.json` 继续保留现有稳定字段,并新增 capability 级别可读元数据:
144
+
145
+ - `capabilities[].runtimeMode`
146
+ - `capabilities[].evidence.bundle`
147
+ - `capabilities[].evidence.debugBuild`
148
+ - `capabilities[].evidence.device`
149
+ - `capabilities[].evidence.release`
115
150
 
116
- - `targetTier`
117
- - `supportSummary`
118
- - `capabilities`
119
- - `dependencies[].supportTier`
151
+ 判读方式:
152
+
153
+ - 任一 `evidence.* = false`,表示晋升到 verified 前仍缺证据
154
+ - `runtimeMode !== verified`,表示即使已有部分证据,也仍不属于正式承诺
120
155
 
121
156
  当前公开阻断 issue code 继续包括:
122
157
 
@@ -143,36 +178,37 @@ toolkit 受管的核心产物仍包括:
143
178
  - `harmony/entry/src/main/cpp/autolinking.cmake`
144
179
  - `harmony/entry/src/main/module.json5`
145
180
  - `.expo-harmony/shims/*`
181
+ - `.expo-harmony/toolkit-config.json`
146
182
 
147
183
  当前约束:
148
184
 
149
185
  - `entry/src/main/module.json5` 的 `requestPermissions` 由 toolkit 根据已启用能力自动补齐
150
186
  - preview / experimental 能力的 Metro import path 通过 `.expo-harmony/shims/<package>` 接管
187
+ - `toolkit-config.json` 会记录 capability 的 `runtimeMode` 与 `evidence`
151
188
  - verified UI stack 依赖继续走现有 autolinking + `.har` 管理逻辑
152
189
 
153
- ## 构建与发布 Gate
154
-
155
- ### Hosted CI gate
156
-
157
- - `pnpm build`
158
- - `pnpm test`
159
- - `npm pack --dry-run`
160
- - tarball 安装 smoke:`doctor --strict`、`init --force`、`bundle`
190
+ ## Release Tracks
161
191
 
162
- ### Capability acceptance gate
192
+ `v1.8` 开始,发布节奏按双轨设计:
163
193
 
164
- - `official-native-capabilities-sample` 在 `--target-tier preview` 下通过 `doctor`
165
- - `sync-template` 生成对应 preview shims 与 Harmony permissions
166
- - Batch A+B route 成功产出 `bundle.harmony.js`
167
- - Batch A+B route 可进入 `build-hap --mode debug`
194
+ - `latest`
195
+ - 只承接完整验收的 `verified` 能力
196
+ - 只允许 verified sample / gate 作为发布依据
197
+ - `next`
198
+ - 承接 preview fast track
199
+ - 必须至少通过 preview sample、bundle、debug build gate
200
+ - 不得被描述为 verified 或 release-ready
168
201
 
169
- ### Verified promotion gate
202
+ ## Capability Promotion Gate
170
203
 
171
204
  能力从 `preview` 晋升到 `verified` 前,必须同时满足:
172
205
 
206
+ - 进入真实 runtime path,`runtimeMode` 不再是 `shim`
173
207
  - 官方 sample 可运行
208
+ - `bundle` 成功
174
209
  - debug `build-hap` 成功
175
- - 设备侧场景验收完成
210
+ - device-side 场景验收完成
211
+ - release signing / release HAP 验收完成
176
212
  - 文档、矩阵、roadmap、acceptance 记录同 PR 更新
177
213
 
178
214
  ## 当前不在短期输入范围
@@ -1,142 +1,111 @@
1
- # v1.7.0 验收记录(已完成)
1
+ # v1.7.0 验收记录(模拟器收口版)
2
2
 
3
- 日期:2026-03-31
3
+ 日期:2026-04-02
4
4
 
5
5
  基线:
6
6
 
7
7
  - 仓库:`Expo-Harmony-Toolkit`
8
8
  - 版本:`1.7.0`
9
- - 发布目标:Batch B capability onboarding baseline
9
+ - 验收约束:当前无真机,只做模拟器与构建层收口
10
10
 
11
11
  ## 当前结论
12
12
 
13
- `v1.7.0` Batch B capability onboarding baseline 已完成验收。
13
+ `v1.7.0` 这一轮的正确结论不是“所有 preview capability verified”,而是:
14
14
 
15
- 这一轮完成了代码与文档基线同步,把 `expo-location`、`expo-camera` 正式推进到 `preview` 接入路径,并把 roadmap 重写为:
15
+ - 四个 official sample 都已经收口成可理解、可上手、可重复操作的官方示例
16
+ - `official-minimal-sample` 不再只是空白 smoke 卡片,而是最短链路说明页
17
+ - `official-app-shell-sample` 不再只是回归页,而是 router / linking / constants 的最小 onboarding sample
18
+ - `official-ui-stack-sample` 继续作为 verified UI-stack 主 sample,并把成功信号写得更显式
19
+ - `official-native-capabilities-sample` 现在按“每页一个模块、只讲核心支持子集、unsupported 边界明确”的方式收口
20
+ - `expo-file-system`、`expo-image-picker`、`expo-location`、`expo-camera` 仍然全部保持 `preview`
21
+ - 在没有真机前,不把任何 preview capability 提升到 `verified`
16
22
 
17
- - `v1.7 Device APIs Batch B + Capability Onboarding`
18
- - `v1.8 Verification and Release Hardening`
19
- - `v1.9 Core Expo Production Modules`
20
- - `v2.0 Core Expo Full Coverage`
21
- - `v2.x Long-tail Native Module Extension`
23
+ 这份记录里默认使用以下判读:
22
24
 
23
- 本轮验收结论是:
24
-
25
- - `expo-location`、`expo-camera` 的 preview-tier 接入链路已经完成基线验收
26
- - `expo-file-system`、`expo-image-picker` 的 Batch A preview route 已完成回归验收
27
- - `doctor --strict` 仍然会正确阻挡全部 preview capability;这条规则没有变化
28
- - `preview` 验收完成不代表这些能力已经晋升到 `verified`
25
+ - `🟡` 表示实现已到位,主要只差真机 / release 证据
26
+ - `🟠` 表示包已进入 `preview`,但这个具体子 API 还没补齐到可信实现;不是“只差真机”
29
27
 
30
28
  ## 本轮实现范围
31
29
 
32
- - `expo-location`、`expo-camera` 调整为 `preview`
33
- - `doctor --target-tier preview` 放行 Batch A+B preview capability
34
- - managed Harmony permission / shim / Metro alias 生成扩展到 Batch A+B
35
- - `official-native-capabilities-sample` 扩充到 `/file-system`、`/image-picker`、`/location`、`/camera`
36
- - roadmap、support matrix、README、sample 指南同步更新
30
+ - 统一重做四个 official sample 的页面表达和使用文档
31
+ - `expo-file-system` sample 补齐目录创建、写入、读回、列目录、复制、移动、清理
32
+ - `expo-image-picker` sample 保留单图选择 / 单次拍照 / denied / canceled / asset-return 主路径
33
+ - `expo-location` sample 收口到 foreground permission、current、last-known、geocode、reverse-geocode
34
+ - `expo-camera` sample 收口到 camera permission + still capture through Harmony system camera UI
35
+ - `expo-location` shim 明确把 `watchPositionAsync`、background permission、heading API 降为 unsupported
36
+ - `expo-camera` shim 明确把 embedded preview、pause/resume、microphone、video 相关入口降为 unsupported
37
+ - sample 指南、support matrix、README、acceptance 记录同步到真实状态
37
38
 
38
39
  ## 自动化检查结果
39
40
 
41
+ 执行:
42
+
40
43
  - `pnpm build`
41
44
  - `pnpm test`
42
- - `official-native-capabilities-sample` 在 preview tier 下完成 `doctor`
43
- - `sync-template` 生成 Batch A+B preview shims 与 Harmony permissions
44
- - `bundle` 成功产出 `bundle.harmony.js`
45
- - `build-hap --mode debug` 成功走完构建路径
46
45
 
47
46
  结果:
48
47
 
49
48
  - `pnpm build`:通过
50
- - `pnpm test`:通过,`11` suites / `58` tests
51
- - `doctor --target-tier preview`:通过,`Eligibility: eligible`
52
- - `doctor --strict`:按预期失败,`STRICT_EXIT=2`
53
- - `init --force`:通过,`written: 42`
54
- - `bundle`:通过,产物位于 `examples/official-native-capabilities-sample/harmony/entry/src/main/resources/rawfile/bundle.harmony.js`
55
- - `build-hap --mode debug`:通过,产物位于 `examples/official-native-capabilities-sample/harmony/entry/build/default/outputs/default/entry-default-unsigned.hap`
56
-
57
- 额外说明:
58
-
59
- - `build-hap --mode debug` 期间仍会提示 `env.signing.missing`
60
- - 这是预期结果;debug HAP 可构建,但 release signing 仍未配置
61
-
62
- ## 模拟器设备侧验收
63
-
64
- 环境:
65
-
66
- - 模拟器 target:`127.0.0.1:5555`
67
- - 安装产物:`examples/official-native-capabilities-sample/harmony/entry/build/default/outputs/default/entry-default-unsigned.hap`
68
- - 安装结果:`install bundle successfully`
69
- - 启动结果:`start ability successfully`
70
-
71
- 首页:
72
-
73
- - `Official Native Capabilities Sample` 成功渲染
74
- - `/file-system`、`/image-picker`、`/location`、`/camera` 四条 route 入口全部可见
75
-
76
- ### File System
77
-
78
- - `/file-system` route 成功打开
79
- - `Attempt preview write` 可触发 preview bridge
80
- - 页面返回 `expo-file-system is routed through the Expo Harmony preview bridge...`
81
- - 路由切换与返回首页过程中未发生 crash
82
-
83
- ### Image Picker
49
+ - `pnpm test`:通过,`11` suites / `61` tests
84
50
 
85
- - `/image-picker` route 成功打开
86
- - `Attempt preview pick` 可触发 preview bridge
87
- - 页面返回 `expo-image-picker is routed through the Expo Harmony preview bridge...`
88
- - 路由切换与返回首页过程中未发生 crash
51
+ 另外,sample 相关针对性回归也已通过:
89
52
 
90
- ### Location
53
+ - `tests/officialSample.test.ts`
54
+ - `tests/officialAppShellSample.test.ts`
55
+ - `tests/officialUiStackSample.test.ts`
56
+ - `tests/officialNativeCapabilitiesSample.test.ts`
57
+ - `tests/init.test.ts`
58
+ - `tests/docs.test.ts`
91
59
 
92
- - `/location` route 成功打开
93
- - `Attempt foreground permission` 可触发 preview bridge
94
- - `Attempt current position` 可触发 preview bridge
95
- - `Attempt watch start` 可触发 preview bridge
96
- - `Clear watch state` 可正常清理本地 watcher 状态
97
- - 页面可观察到 `requestForegroundPermissionsAsync`、`getCurrentPositionAsync(`、`watchPositionAsync(` 与 `Preview watch state cleared.`
98
- - 路由切换与返回首页过程中未发生 crash
60
+ ## 这版 sample 的实际完成度
99
61
 
100
- ### Camera
62
+ ### Official Minimal Sample
101
63
 
102
- - `/camera` route 成功打开
103
- - `Expo Harmony preview camera surface` 成功渲染
104
- - `Attempt camera permission` 可触发 preview bridge
105
- - `Attempt preview capture` 可触发 preview bridge
106
- - 页面可观察到 `requestCameraPermissionsAsync` 与 `CameraView.takePictureAsync(`
107
- - 路由切换与返回首页过程中未发生 crash
64
+ - 页面现在明确说明它验证的是最短 `doctor -> init -> bundle -> build-hap` 链路
65
+ - 页面明确写出成功标准与故意不覆盖的范围
66
+ - 适合作为新开发者的最小入口,而不是仅供维护者理解的 smoke baseline
108
67
 
109
- ### 权限声明检查
68
+ ### Official App Shell Sample
110
69
 
111
- - `ohos.permission.LOCATION`
112
- - `ohos.permission.APPROXIMATELY_LOCATION`
113
- - `ohos.permission.CAMERA`
114
- - `ohos.permission.READ_IMAGEVIDEO`
70
+ - 首页明确展示 app name、pathname、observed URL、generated details URL
71
+ - 同时提供 router push、`Link` 组件、generated deep link 三条入口
72
+ - `/details` 页面也会回显当前 pathname / URL,便于判断 deep-link 是否真正解析成功
115
73
 
116
- 以上权限已在 `bm dump -n com.blackishgreen.expoharmonynativepreview` 中确认存在。
74
+ ### Official UI Stack Sample
117
75
 
118
- ## 晋升规则
76
+ - 保留 router、linking、constants、SVG、reanimated 的 verified 主线
77
+ - 首页新增“Success signals”表达,降低验收歧义
78
+ - `/details` 页面会回显 route / URL,帮助判断动画和路由是否互相影响
119
79
 
120
- - `preview` 能力只有在 sample、fixture、bundle、debug HAP、设备侧验收、文档记录都完成后,才允许晋升到 `verified`
121
- - `expo-file-system`、`expo-image-picker` 不作为本轮发版阻塞;若证据不足则继续停留在 `preview`
80
+ ### Official Native Capabilities Sample
122
81
 
123
- ## 本轮已完成与未完成的边界
82
+ - `/file-system`
83
+ - 现在是完整 sandbox 文件流 sample
84
+ - 覆盖目录创建、读写、inspect、列目录、copy、move、cleanup
85
+ - `/image-picker`
86
+ - 继续聚焦 permission、单图选择、单次拍照、deny/cancel/success 三类结果
87
+ - `/location`
88
+ - `🟡` foreground permission、current、last-known、geocode、reverse-geocode 可直接操作
89
+ - `🟠` `watchPositionAsync`、background permission、heading API 已不再伪装成主路径支持;这些不是“只差真机”
90
+ - `/camera`
91
+ - `🟡` 相机权限和 through-system-ui 的 still capture 可直接操作
92
+ - `🟠` embedded preview、pause/resume、microphone、video 已不再伪装成主路径支持;这些不是“只差真机”
124
93
 
125
- 已完成:
94
+ ## 当前未完成的边界
126
95
 
127
- - preview-tier capability onboarding 基线
128
- - managed shim / permission / Metro alias / route / debug build / emulator walkthrough
129
- - Batch A+B unified sample 的可安装、可启动、可点击、可观察 preview bridge 验收
96
+ 在没有真机前,以下内容仍未完成:
130
97
 
131
- 未完成:
98
+ - 任一 preview capability 的 `verified` 晋升
99
+ - `🟡` 已实现子集的真机与 release 证据补齐
100
+ - `🟠` `expo-location` 的真实 continuous watch、background permission parity、heading API 实现与验收
101
+ - `🟠` `expo-camera` 的 embedded live preview、preview pause/resume、microphone / video API 实现与验收
102
+ - release signing 配置以外的真机 release HAP 运行证据
132
103
 
133
- - `expo-location` 的真实权限 grant / deny 与真实坐标结果验收
134
- - `expo-camera` 的真实权限 grant / deny 与真实拍照文件结果验收
135
- - release signing / release HAP 验收
136
- - 任何 preview capability 的 `verified` 晋升
104
+ ## 版本结论
137
105
 
138
- 因此,`v1.7.0` 的结论不是“location/camera 已经原生完全可用”,而是:
106
+ 因此,`v1.7.0` 现在可以对外保持的准确说法是:
139
107
 
140
- - 它们已经完成 preview baseline 验收
141
- - 工具链已经可以稳定支撑分析、生成、bundle、build、install、launch、route、bridge
142
- - 它们仍然留在 `preview`,直到真实 Harmony-native runtime 证据补齐为止
108
+ - verified 主线仍然只有 `expo55-rnoh082-ui-stack`
109
+ - 四个 native capability 已经收口成“模拟器下真正可用的高质量 preview sample”
110
+ - 工具链、sample、矩阵、README、acceptance 文档现在口径一致
111
+ - 下一步只有在拿到真机后,才应该讨论 capability promotion