Flutter IOS product flavors not running

Viewed 1007

I have implemented product flavors in my flutter app and i have add three different google-services.plist files. Now when I try to run my ios app it throws this error. I followed this medium post link

Xcode's output:

error: Multiple commands produce
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist':
1) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/development/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
2) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/master/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
3) Target 'Runner' (project 'Runner') has copy command from '/Users/abc/Downloads/stage/GoogleService-Info.plist' to
'/Users/abc/MarkiTech/pulscare_mobile/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
1 Answers

If your Runner target contains GoogleService-Info.plist in Bundle Resources try this:

  1. Open your iOS workspace in Xcode
  2. Tap Runner project in project navigator (left panel with files)
  3. Tap Runner in TARGETS list
  4. Go to Build Phases tab
  5. Expand Copy Bundle Resources
  6. Remove GoogleService-Info.plist from Bundle Resources
Related