Use different GoogleService-Info.plist for different build schemes in iOS

July 21, 2022

Use different GoogleService-Info.plist for different build schemes in iOS

For each of your targets, e.g. dev, stg, prod:

  • Download the corresponding GoogleService-Info.plistto a separate folder named after your target
  • In Xcode, right-click your app folder and choose Add files to "your app"enter image description here
  • Select the folder containing the target’sGoogleService-Info.plist, make sureCopy items if neededand Create groupsare selected, check only the corresponding target in the list of targets, and press Addenter image description here

That’s it. Now you should have something similar to this structure

enter image description here

When you build a target, the correct GoogleService-Info.plistwill be used.

Reference or copy from : https://stackoverflow.com/questions/37615405/use-different-googleservice-info-plist-for-different-build-schemes


Written by Manoj Bhardwaj who lives and works in Dharamshala Himachal Pradesh (India). My stackoverflow