Skip to content

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

Open

Description

@kazuhiro-ando

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 rive-react-native@9.8.6.
  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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions