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

オープン 初心者向け
#450 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rive-app/rive-react-native のほかの issue

rive-app/rive-react-native の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。