v10.55.1
English
Bug fixes
- iOS:
switchVersion/restartAppdid not restart the app inuse_frameworks!builds on the New Architecture. The reload path probedRCTReloadCommand.hwith a quoted__has_include, which only resolves in static-library builds. Underuse_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 —switchVersionresolved 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 triggerRCTTriggerReloadCommandListeners. (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,
downloadUpdateused to reportdownloadSuccessand return the target hash without installing anything, steering app code intoswitchVersion, which then failed withSWITCH_VERSION_FAILED: Bundle version … not found.. It now logs the development-environment guidance and returnsundefined, 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 应用升级——受影响的集成方式下,此前热更新只能在手动重启应用后生效。