AngeloAvv / flutter_flavorizr

A flutter utility to easily create flavors in your flutter application
https://pub.dev/packages/flutter_flavorizr
MIT License
456 stars 81 forks source link

Firebase config phase script wrong #162

Closed Klabauterman closed 6 months ago

Klabauterman commented 1 year ago

When you use the firebase: and config: parameters to give a flavor its own GoogleService-Info.plist, a phase script gets created for the ios project. Unfortunatly the created phase script does not have an output file defined, so the build fails if there is no file prior to the build. It should define have this in Output files: $(SRCROOT)/Runner/GoogleService-Info.plist

AngeloAvv commented 1 year ago

Hey @Klabauterman I'm sorry but I don't understand what's the problem. Can you please elaborate?

jaeyongjaykim commented 1 year ago

I had the same issue. Building on the local machine works fine, but building on CI/CD pipeline fails.

▸ Copying GoogleService-Info.plist

❌  error: Build input file cannot be found: '/Users/runner/work/<project_name>/<project_name>/ios/Runner/GoogleService-Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'Runner' from project 'Runner')

I have modified the default script and added Input and Output Files to get it to work.

image

I hope flavorizr script adds Input and Output files for the iOS Build Phases script. @AngeloAvv

vinifig commented 6 months ago

It's not setting the output on add_firebase_build_phase.rb script. I've opened the #248 that fixes this