<commit_before># FirebaseEnvironmentsDemo

An Xcode project showing how to swap out your `GoogleService-Info.plist` based on build configuration to enable you to keep separate development and production Firebase environments.

## Getting Started

At a high level, the main idea is to add a run script build phase to your target that selectively copies the appropriate `GoogleService-Info.plist` based on the build configuration used to build the app. As such, the "magic" of this project lies in the Xcode project configuration itself so don't expect the app to do much if you decide to run it yourself.
The main areas of interest include:
* Firebase/Dev and Firebase/Prod folders.
    * These contain the `GoogleService-Info.plist` for the Firebase development and production environments. Note that the names of these files are kept as their defaults and they are *not* part of the app target.
* "Setup Firebase Environment GoogleService-Info.plist" Run Script Build Phase
    * This shell script, part of the target's *Build Phases*, is where the appropriate `GoogleService-Info.plist` is copied based on build configuration.

### Prerequisites

To build the sample app, you'll need CocoaPods. CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
```<commit_msg>Added link to shell script gist.<commit_after># FirebaseEnvironmentsDemo

An Xcode project showing how to swap out your `GoogleService-Info.plist` based on build configuration to enable you to keep separate development and production Firebase environments.

## Getting Started

At a high level, the main idea is to add a run script build phase to your target that selectively copies the appropriate `GoogleService-Info.plist` based on the build configuration used to build the app. As such, the "magic" of this project lies in the Xcode project configuration itself so don't expect the app to do much if you decide to run it yourself.
The main areas of interest include:
* Firebase/Dev and Firebase/Prod folders.
    * These contain the `GoogleService-Info.plist` for the Firebase development and production environments. Note that the names of these files are kept as their defaults and they are *not* part of the app target.
* "Setup Firebase Environment GoogleService-Info.plist" Run Script Build Phase
    * This [shell script](https://gist.github.com/tylermilner/f8e9121d62c890cb707bc1810a7d57d9), part of the target's *Build Phases*, is where the appropriate `GoogleService-Info.plist` is copied based on build configuration.

### Prerequisites

To build the sample app, you'll need CocoaPods. CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
```
{'fraction_non_alphanumeric': 0.05079131394920869, 'fraction_numerical': 0.007729112992270887, 'mean_word_length': 4.820128479657388, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6730089', 'n_tokens_mistral': 702, 'n_tokens_neox': 656, 'n_words': 379}