diff --git a/rive-react-native.podspec b/rive-react-native.podspec index 52a511e..18f26d9 100644 --- a/rive-react-native.podspec +++ b/rive-react-native.podspec @@ -3,7 +3,8 @@ require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) # Resolve Rive iOS SDK version -podfile_properties_path = File.join(__dir__, "ios", "Podfile.properties.json") +installation_root = defined?(Pod::Config) && Pod::Config.instance.installation_root +podfile_properties_path = installation_root ? File.join(installation_root.to_s, "Podfile.properties.json") : File.join(__dir__, "ios", "Podfile.properties.json") if File.exist?(podfile_properties_path) podfile_properties = JSON.parse(File.read(podfile_properties_path)) rive_ios_version = podfile_properties["RiveRuntimeIOSVersion"]