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

Abierto Apto para principiantes
#450 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
ios, react-native, ruby

Línea de trabajo

Lee rive-react-native.podspec y sigue cómo resuelve Podfile.properties.json y la versión de respaldo. Comprueba la sección «Native version customization» del README para confirmar el comportamiento documentado. Actualiza la búsqueda de propiedades para que pod install use el directorio del Podfile de la aplicación y, después, verifica que se seleccione la versión configurada del SDK de iOS en lugar de la versión predeterminada del paquete.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
789
Forks
81
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rive-app/rive-react-native

Todos los issues de rive-app/rive-react-native

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.