From a9523cafbedd37e2442becbbf6c1fa7d943f7155 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Wed, 21 Jan 2026 18:33:31 -0800 Subject: [PATCH] Fix rive_native setup script path in Podfile Ensures the rive_native setup script runs from the project root by updating its shell script phase in the Podfile. This change helps CI environments locate pubspec.yaml correctly. --- {{cookiecutter.out_dir}}/ios/Podfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.out_dir}}/ios/Podfile b/{{cookiecutter.out_dir}}/ios/Podfile index 8547703..4cd22bb 100644 --- a/{{cookiecutter.out_dir}}/ios/Podfile +++ b/{{cookiecutter.out_dir}}/ios/Podfile @@ -66,6 +66,19 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + # Ensure rive_native's setup script runs from the project root so pubspec.yaml is found in CI. + if 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 target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ @@ -85,4 +98,4 @@ post_install do |installer| ] end end -end \ No newline at end of file +end