You have two GoogleService-Info.plist objects in one target in Xcode

I have two different target-oriented environments (one for development and one for production), which is why I want to use two different GoogleService-Info.plist services, but all the same unsuccessfully. Is there any way to do this?

+4
source share
2 answers

I am using the following solution:

Create a GoogleService-CONFIGURATION-Info.plist file for each Xcode configuration. Do not link files with purpose.

Add Script Run Build Phase:

cp ${SRCROOT}/Resources/Firebase/GoogleService-${CONFIGURATION}-Info.plist ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleService-Info.plist

+6
source
  • keep the same names for GoogleService-Info.plist
  • GoogleService-Info.plist , , ""
  • Xcode,
  • FIRApp.configure() AppDelegate,
+2

All Articles