Repository navigation
v10.60.0
English
One native core for all three platforms
The native update round (the cold-start check that runs without JS), patch-manifest parsing, install records and archive limits used to be implemented separately on Android, iOS and HarmonyOS. They now live once in the shared C++ core, so the three platforms follow the same rules. No public API, server path, configuration value or persisted state changes; this is a native release, so rebuild the app.
Where the platforms disagreed, they now follow the JS SDK or the strictest of the previous behaviours:
- Native configuration:
disabledis read the way JS reads it (1or"true"disable the native check; previously Android only honouredtrue/"true").appKeyis trimmed with JS whitespace rules, and configuration text with trailing garbage is rejected. - Downloads in the native round: a patch that downloads but fails to apply (
PATCH_FAILED) no longer makes the native round download it again from every mirror; it moves on to the next strategy, as JS does. - https-only: when every configured endpoint is https, Android and iOS now ignore non-https endpoints from
queryUrlslists andhttp://artifact URLs, as HarmonyOS already did. __diff.json: one parser for all platforms. Malformed manifests (wrong field types, non-integer or contradictorycopiesCrc, a non-objecthbcTransform) now fail the patch and the update falls back to the full package, instead of being coerced or silently ignored.- Install records: written atomically (temp file, fsync, rename, directory fsync) on every platform. A schema-1 record without
bundleSha256is no longer trusted, and recorded current/last versions are verified before activation. A failure to hash the bundle fails the install. - Archive limits: the same checks on every platform: exact 100:1 compression-ratio limit (per entry and per archive), symlinks rejected, reserved
.pushy-names rejected at any depth.
Fixes
- iOS: builds with
use_frameworks!failed to findhpatch.h. - iOS before 15.4 (JSC): reusing the native check cache threw on
Object.hasOwnand was silently skipped. - Android: strings passed from native code to Java no longer break on characters outside the BMP (e.g. emoji in paths).
- Telemetry: a download rescued by a later strategy no longer reports network errors as
patch_fail. - JS: tighter native config sync, check-cache reuse and download retries (mirrors are ranked once per strategy; a failed winner is demoted).
For integrators
- Android: the old- and new-architecture modules were merged into one
UpdateModule; nothing changes for apps. The library now compiles with Java 8 lambdas (compileOptionsis set explicitly for older Android Gradle Plugin versions). - iOS:
RCTPushy.mmwas split into several files; the podspec picks them up automatically. Runpod installafter upgrading.
中文
三端共用一份原生内核
原生更新流程(不依赖 JS 的冷启动检查)、补丁清单解析、安装记录和归档限额,过去在 Android、iOS、鸿蒙上各写一份,现在都只在共享 C++ 内核里实现一次,三端规则保持一致。公开 API、服务端路径、配置项和持久化状态都没有变化。这是原生版本,需要重新构建应用。
原来三端不一致的地方,现在统一按 JS SDK 或此前最严格的那一端处理:
- 原生配置:
disabled按 JS 的真值规则判断(1、"true"都会关闭原生检查;原来 Android 只认true/"true")。appKey按 JS 的空白规则去除首尾空白;配置文本后面带多余内容时直接判为无效。 - 原生流程的下载:补丁下载成功但无法应用(
PATCH_FAILED)时,不再逐个镜像重新下载,而是和 JS 一样直接换下一个策略。 - 仅 https:配置的端点全部是 https 时,Android 和 iOS 现在也会忽略
queryUrls列表里的非 https 端点和http://下载地址,与鸿蒙一致。 __diff.json:三端共用一个解析器。字段类型错误、copiesCrc不是整数或相互矛盾、hbcTransform不是对象等畸形清单,现在会让补丁失败并回退到全量包,不再被强转或静默忽略。- 安装记录:三端统一原子写入(临时文件、fsync、rename、目录 fsync)。缺少
bundleSha256的 schema 1 记录不再被信任;记录在 current/last 中的版本激活前也会校验;计算 bundle 摘要失败会让安装失败。 - 归档限额:三端执行同一套检查:单条和整包都按精确的 100:1 压缩比限制,拒绝符号链接,任意层级的
.pushy-保留名都拒绝。
修复
- iOS:使用
use_frameworks!时找不到hpatch.h、编译失败的问题。 - iOS 15.4 以下(JSC):复用原生检查缓存时因
Object.hasOwn抛错而被静默跳过的问题。 - Android:原生传给 Java 的字符串遇到 BMP 以外的字符(如路径中的 emoji)时出错的问题。
- 遥测:下载被后续策略救回时,不再把其间的网络错误上报为
patch_fail。 - JS:收紧原生配置同步、检查缓存复用和下载重试(每个策略只做一次镜像测速,失败的优选镜像会被降级)。
接入方须知
- Android:新旧架构的模块已合并为同一个
UpdateModule,应用侧无需改动。库代码使用 Java 8 lambda,已显式设置compileOptions,兼容较老的 Android Gradle Plugin。 - iOS:
RCTPushy.mm拆成了多个文件,podspec 会自动包含。升级后请执行pod install。