iOS: RiveRuntimeIOSVersion in ios/Podfile.properties.json is ignored (podspec reads it from node_modules)
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- ios, react-native, ruby
- 领域
- build-system, mobile
调研方向
阅读 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
- Expo app with
[email protected]. - Add a config plugin that sets
RiveRuntimeIOSVersion: "6.29.0"viawithPodfileProperties(as in the README), thennpx expo prebuild. - Confirm
ios/Podfile.properties.jsoncontains"RiveRuntimeIOSVersion": "6.29.0". - Run
pod install:RiveRuntimeresolves 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
mainhas the same line) - Expo SDK 58 / React Native 0.88
- 主要语言
- TypeScript
- 星标
- 789
- 派生
- 81
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rive-app/rive-react-native 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
rive-app/rive-react-native#431 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 43/100
rive-app/rive-react-native#449 ·
-
难度 4/5 3-5 天 新手友好度 35/100
rive-app/rive-react-native#448 · 2 条评论 · 1 个 reaction ·
-
[Android] Rive events dispatched off the UI thread can deadlock with Reanimated under Fabric (ANR)可能已有人在做 @Togetic 于 69 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
rive-app/rive-react-native#444 ·
-
难度 4/5 3-5 天 新手友好度 45/100
rive-app/rive-react-native#441 ·
查看 rive-app/rive-react-native 的全部 Issue
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 条评论 ·
维护者通常 1 天内回复
-
S-Needs triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
CLI Empathy needs triage
难度 2/5 1-3 小时 新手友好度 70/100
chromaui/chromatic-cli#1665 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
software-mansion/argent#1854 ·
维护者通常 1 天内回复
-
难度 2/5 1 小时以内 新手友好度 65/100
nilbuild/developer-roadmap#10557 ·
维护者通常 1 天内回复