From 0b1778d764c6dc8211d031b39cdf05daa70b18fe Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 16 Jan 2026 19:55:05 -0800 Subject: [PATCH] Fix rive_native setup script path in macOS Podfile Ensures the rive_native setup script runs from the project root by setting PROJECT_ROOT and changing directory, allowing pubspec.yaml to be found in CI environments. --- {{cookiecutter.out_dir}}/macos/Podfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/{{cookiecutter.out_dir}}/macos/Podfile b/{{cookiecutter.out_dir}}/macos/Podfile index dbccf89..325d6ae 100644 --- a/{{cookiecutter.out_dir}}/macos/Podfile +++ b/{{cookiecutter.out_dir}}/macos/Podfile @@ -37,7 +37,20 @@ target 'Runner' do end post_install do |installer| + # Ensure rive_native's setup script runs from the project root so pubspec.yaml is found in CI. installer.pods_project.targets.each do |target| flutter_additional_macos_build_settings(target) + next unless target.name == 'rive_native' + + target.shell_script_build_phases.each do |phase| + script = phase.shell_script + next unless script&.include?('rive_native:setup') + next if script.include?('PROJECT_ROOT="${SRCROOT}/../.."') + + phase.shell_script = script.sub( + "set -e\n", + "set -e\nPROJECT_ROOT=\"${SRCROOT}/../..\"\ncd \"$PROJECT_ROOT\"\n" + ) + end end end