iOS: RiveRuntimeIOSVersion in ios/Podfile.properties.json is ignored (podspec reads it from node_modules)

未关闭 适合新手
#450 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ios, react-native, ruby

调研方向

阅读 rive-react-native.podspec,跟踪它如何解析 Podfile.properties.json 和回退版本。检查 README 的“Native version customization”部分,确认文档中描述的行为。更新属性查找,使 pod install 使用应用的 Podfile 目录,然后验证选择的是配置的 iOS SDK 版本,而不是软件包默认版本。

由索引模型根据 Issue 内容生成。

描述

Description

The documented way to override the Rive iOS SDK version (RiveRuntimeIOSVersion in ios/Podfile.properties.json, or withPodfileProperties in Expo — see the README's "Native version customization" section) has no effect. The podspec silently falls back to runtimeVersions.ios from the package's own package.json.

The cause is the path the podspec reads:

# rive-react-native.podspec (9.8.6, same on main)
podfile_properties_path = File.join(__dir__, "ios", "Podfile.properties.json")

__dir__ is the directory of the podspec itself, i.e. node_modules/rive-react-native, so this resolves to node_modules/rive-react-native/ios/Podfile.properties.json. That file doesn't exist in a normal install, so the app's ios/Podfile.properties.json is never read, and nothing warns about it: the Using Rive iOS SDK ... line just shows the package default (6.24.0 for 9.8.6).

(We found this by reading the podspec while setting up the override; CocoaPods evaluates a podspec with its own file path, so __dir__ is the package directory.)

(The Android side works as documented, because android/build.gradle reads Rive_RiveRuntimeAndroidVersion through Gradle project properties.)

Steps to reproduce
  1. Expo app with [email protected].
  2. Add a config plugin that sets RiveRuntimeIOSVersion: "6.29.0" via withPodfileProperties (as in the README), then npx expo prebuild.
  3. Confirm ios/Podfile.properties.json contains "RiveRuntimeIOSVersion": "6.29.0".
  4. Run pod install: RiveRuntime resolves to the package default (6.24.0), not 6.29.0.
Suggested fix

Read the file from the directory that contains the Podfile, which is where both Expo and the bare React Native template keep Podfile.properties.json:

podfile_properties_path = File.join(Pod::Config.instance.installation_root.to_s, "Podfile.properties.json")

We are currently applying exactly this change with patch-package.

Versions
  • rive-react-native 9.8.6 (podspec on main has the same line)
  • Expo SDK 58 / React Native 0.88
主要语言
TypeScript
星标
789
派生
81
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rive-app/rive-react-native 的其他 Issue

查看 rive-app/rive-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。