Skip to content

v10.55.1

Choose a tag to compare

@sunnylqm sunnylqm released this 31 Aug 12:30
· 23 commits to master since this release
b15223c

English

Bug fixes

  • iOS: switchVersion / restartApp did not restart the app in use_frameworks! builds on the New Architecture. The reload path probed RCTReloadCommand.h with a quoted __has_include, which only resolves in static-library builds. Under use_frameworks! (common in hybrid apps pulled into dynamic frameworks by Swift pods) the probe failed, and the compiled fallback [self.bridge reload] is a silent no-op in bridgeless mode — switchVersion resolved successfully but the app never reloaded, so the update only took effect after the user manually killed and relaunched the app. The probe now falls back to <React/RCTReloadCommand.h> and both build styles trigger RCTTriggerReloadCommandListeners. (89c638e)
  • Development environment: no more fabricated download success when there is nothing to download. In dev, when the check response carries no full-package URL, downloadUpdate used to report downloadSuccess and return the target hash without installing anything, steering app code into switchVersion, which then failed with SWITCH_VERSION_FAILED: Bundle version … not found.. It now logs the development-environment guidance and returns undefined, so nothing downstream treats the no-op as a real update. (9ad95fb)

Upgrading is recommended for all iOS apps built with use_frameworks! — on affected setups hot updates previously only applied after a manual app relaunch.

中文

问题修复

  • iOS:新架构下 use_frameworks! 构建的应用,switchVersion / restartApp 不会触发重启。 重启路径此前用引号形式的 __has_include 探测 RCTReloadCommand.h,该形式只在静态链接构建下可解析;在 use_frameworks!(混编应用常因 Swift pod 被迫开启动态框架)下探测失败,编入的兜底 [self.bridge reload] 在 bridgeless 模式下是静默空操作——switchVersion 正常 resolve 但应用不会重载,更新只能在用户手动杀掉进程重开后生效。现探测失败时回退到 <React/RCTReloadCommand.h>,两种构建方式均会触发 RCTTriggerReloadCommandListeners。(89c638e)
  • 开发环境:无内容可下载时不再伪造下载成功。 开发环境下,当检查结果中没有全量包 URL 时,downloadUpdate 此前会在未安装任何内容的情况下上报 downloadSuccess 并返回目标 hash,引导业务代码调用 switchVersion,进而报 SWITCH_VERSION_FAILED: Bundle version … not found.。现改为打印开发环境提示并返回 undefined,下游不会再把这次空操作当成真实更新。(9ad95fb)

建议所有使用 use_frameworks! 构建的 iOS 应用升级——受影响的集成方式下,此前热更新只能在手动重启应用后生效。