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

Aperta Adatta ai principianti
#450 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
ios, react-native, ruby

Direzione di ricerca

Leggi rive-react-native.podspec e segui il modo in cui risolve Podfile.properties.json e la versione di fallback. Controlla la sezione «Native version customization» del README per confermare il comportamento documentato. Aggiorna la ricerca della proprietà in modo che pod install usi la directory del Podfile dell'app, quindi verifica che venga selezionata la versione configurata dell'SDK iOS invece di quella predefinita del pacchetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
789
Fork
81
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rive-app/rive-react-native

Tutte le issue di rive-app/rive-react-native

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.