I have different build configurations (Debug, Stage, Prod) defined for my app and I use User-Defined build settings:
to set up Facebook log
Create a new folder (for example: GoogleServiceInfoPlists).
Copy there all .plist files for each Configuration
for example:
GoogleService-Info-Debug.plist,
GoogleService-Info-Alpha.plist,
GoogleService-Info-Beta.plist,
GoogleService-Info-Release.plist
Add new Run Script Phase at last (Xcode: Target -> Build Phases -> "+" button).
Use script below to copy .plist file for given environment to the build directory.
script:
RESOURCE_PATH=${SRCROOT}/${PRODUCT_NAME}/GoogleServiceInfoPlists/GoogleService-Info-$CONFIGURATION.plist
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
echo "Copying ${RESOURCE_PATH} to ${BUILD_APP_DIR}"
cp "${RESOURCE_PATH}" "${BUILD_APP_DIR}/GoogleService-Info.plist"
PS: You do not need to add the file to project. Just create a new folder in the main directory.