├── Images ├── run-app-debug.png ├── run-app-release.png ├── not-part-of-target.png ├── change-scheme-release.png ├── show-package-contents.png ├── firebase_dev-firebae_prod-folders.png └── setup-firebase-environment-run-script.png ├── Podfile ├── FirebaseEnvironmentsDemo.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── FirebaseEnvironmentsDemo.xcworkspace ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── contents.xcworkspacedata ├── FirebaseEnvironmentsDemo ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Firebase │ ├── Dev │ │ └── GoogleService-Info.plist │ └── Prod │ │ └── GoogleService-Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard └── ViewController.swift ├── LICENSE ├── .gitignore ├── Podfile.lock └── README.md /Images/run-app-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/run-app-debug.png -------------------------------------------------------------------------------- /Images/run-app-release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/run-app-release.png -------------------------------------------------------------------------------- /Images/not-part-of-target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/not-part-of-target.png -------------------------------------------------------------------------------- /Images/change-scheme-release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/change-scheme-release.png -------------------------------------------------------------------------------- /Images/show-package-contents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/show-package-contents.png -------------------------------------------------------------------------------- /Images/firebase_dev-firebae_prod-folders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/firebase_dev-firebae_prod-folders.png -------------------------------------------------------------------------------- /Images/setup-firebase-environment-run-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tylermilner/FirebaseEnvironmentsDemo/HEAD/Images/setup-firebase-environment-run-script.png -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | 3 | target 'FirebaseEnvironmentsDemo' do 4 | use_frameworks! 5 | 6 | # Firebase 7 | pod 'Firebase/Core' 8 | 9 | end 10 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FirebaseEnvironmentsDemo 4 | // 5 | // Created by Tyler Milner on 7/28/17. 6 | // Copyright © 2017 Bottle Rocket Studios. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Firebase 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | FirebaseApp.configure() 19 | return true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Tyler Milner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Firebase/Dev/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AD_UNIT_ID_FOR_BANNER_TEST 6 | ca-app-pub-3940256099942544/2934735716 7 | AD_UNIT_ID_FOR_INTERSTITIAL_TEST 8 | ca-app-pub-3940256099942544/4411468910 9 | CLIENT_ID 10 | 363200679145-otd40eim0dg3ji29rsmdr5rfajjoqmoe.apps.googleusercontent.com 11 | REVERSED_CLIENT_ID 12 | com.googleusercontent.apps.363200679145-otd40eim0dg3ji29rsmdr5rfajjoqmoe 13 | API_KEY 14 | AIzaSyCSzXkdwhGjXIZlA0-P8gm6Zo18rlt-VaY 15 | GCM_SENDER_ID 16 | 363200679145 17 | PLIST_VERSION 18 | 1 19 | BUNDLE_ID 20 | com.bottlerocketstudios.FirebaseEnvironmentsDemo 21 | PROJECT_ID 22 | fir-environmentsdemo-dev 23 | STORAGE_BUCKET 24 | fir-environmentsdemo-dev.appspot.com 25 | IS_ADS_ENABLED 26 | 27 | IS_ANALYTICS_ENABLED 28 | 29 | IS_APPINVITE_ENABLED 30 | 31 | IS_GCM_ENABLED 32 | 33 | IS_SIGNIN_ENABLED 34 | 35 | GOOGLE_APP_ID 36 | 1:363200679145:ios:0e3504839b48e874 37 | DATABASE_URL 38 | https://fir-environmentsdemo-dev.firebaseio.com 39 | 40 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Firebase/Prod/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AD_UNIT_ID_FOR_BANNER_TEST 6 | ca-app-pub-3940256099942544/2934735716 7 | AD_UNIT_ID_FOR_INTERSTITIAL_TEST 8 | ca-app-pub-3940256099942544/4411468910 9 | CLIENT_ID 10 | 110276521110-9njq1e7n3njujhqejcp14p2gv2m665mc.apps.googleusercontent.com 11 | REVERSED_CLIENT_ID 12 | com.googleusercontent.apps.110276521110-9njq1e7n3njujhqejcp14p2gv2m665mc 13 | API_KEY 14 | AIzaSyDsCSeAl5u8Df04jNvGdHk3eiptJvmcigU 15 | GCM_SENDER_ID 16 | 110276521110 17 | PLIST_VERSION 18 | 1 19 | BUNDLE_ID 20 | com.bottlerocketstudios.FirebaseEnvironmentsDemo 21 | PROJECT_ID 22 | fir-environmentsdemo-prod 23 | STORAGE_BUCKET 24 | fir-environmentsdemo-prod.appspot.com 25 | IS_ADS_ENABLED 26 | 27 | IS_ANALYTICS_ENABLED 28 | 29 | IS_APPINVITE_ENABLED 30 | 31 | IS_GCM_ENABLED 32 | 33 | IS_SIGNIN_ENABLED 34 | 35 | GOOGLE_APP_ID 36 | 1:110276521110:ios:0e3504839b48e874 37 | DATABASE_URL 38 | https://fir-environmentsdemo-prod.firebaseio.com 39 | 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FirebaseEnvironmentsDemo 4 | // 5 | // Created by Tyler Milner on 7/28/17. 6 | // Copyright © 2017 Bottle Rocket Studios. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// Represents the possible Firebase App IDs that we want to toggle based on build type (development vs production). 12 | enum FirebaseAppId: String { 13 | case dev = "1:363200679145:ios:0e3504839b48e874" 14 | case prod = "1:110276521110:ios:0e3504839b48e874" 15 | 16 | var environment: String { 17 | switch self { 18 | case .dev: 19 | return "dev" 20 | case .prod: 21 | return "prod" 22 | } 23 | } 24 | } 25 | 26 | /// Represents the GoogleService-Info.plist contained in the app bundle. 27 | struct GoogleServiceInfo: Decodable { 28 | let appId: String 29 | 30 | private enum CodingKeys: String, CodingKey { 31 | case appId = "GOOGLE_APP_ID" 32 | } 33 | } 34 | 35 | class ViewController: UIViewController { 36 | 37 | // MARK: - IBOutlets 38 | 39 | @IBOutlet private var firebaseAppIdLabel: UILabel! 40 | 41 | // MARK: - Lifecycle 42 | 43 | override func viewDidLoad() { 44 | super.viewDidLoad() 45 | setupFirebaseAppIdLabel() 46 | } 47 | 48 | // MARK: - Private 49 | 50 | private func setupFirebaseAppIdLabel() { 51 | guard let googleServiceInfoPlistPath = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist") else { 52 | fatalError("Couldn't locate GoogleService-Info.plist") 53 | } 54 | 55 | do { 56 | let plistData = try Data.init(contentsOf: URL(fileURLWithPath: googleServiceInfoPlistPath)) 57 | 58 | let plistDecoder = PropertyListDecoder() 59 | let googleServiceInfo = try plistDecoder.decode(GoogleServiceInfo.self, from: plistData) 60 | 61 | let rawAppId = googleServiceInfo.appId 62 | guard let appId = FirebaseAppId(rawValue: rawAppId) else { 63 | fatalError("Invalid appId: \(rawAppId)") 64 | } 65 | 66 | firebaseAppIdLabel.text = buildAppIdStatusText(from: appId) 67 | } catch { 68 | fatalError("\(error)") 69 | } 70 | } 71 | 72 | private func buildAppIdStatusText(from appId: FirebaseAppId) -> String { 73 | return "Firebase AppId:" + "\n" + appId.rawValue + "\n" + "(\(appId.environment))" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase/Core (6.3.0): 3 | - Firebase/CoreOnly 4 | - FirebaseAnalytics (= 6.0.2) 5 | - Firebase/CoreOnly (6.3.0): 6 | - FirebaseCore (= 6.0.3) 7 | - FirebaseAnalytics (6.0.2): 8 | - FirebaseCore (~> 6.0) 9 | - FirebaseInstanceID (~> 4.2) 10 | - GoogleAppMeasurement (= 6.0.2) 11 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 12 | - GoogleUtilities/MethodSwizzler (~> 6.0) 13 | - GoogleUtilities/Network (~> 6.0) 14 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 15 | - nanopb (~> 0.3) 16 | - FirebaseCore (6.0.3): 17 | - GoogleUtilities/Environment (~> 6.0) 18 | - GoogleUtilities/Logger (~> 6.0) 19 | - FirebaseInstanceID (4.2.0): 20 | - FirebaseCore (~> 6.0) 21 | - GoogleUtilities/Environment (~> 6.0) 22 | - GoogleUtilities/UserDefaults (~> 6.0) 23 | - GoogleAppMeasurement (6.0.2): 24 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 25 | - GoogleUtilities/MethodSwizzler (~> 6.0) 26 | - GoogleUtilities/Network (~> 6.0) 27 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 28 | - nanopb (~> 0.3) 29 | - GoogleUtilities/AppDelegateSwizzler (6.2.1): 30 | - GoogleUtilities/Environment 31 | - GoogleUtilities/Logger 32 | - GoogleUtilities/Network 33 | - GoogleUtilities/Environment (6.2.1) 34 | - GoogleUtilities/Logger (6.2.1): 35 | - GoogleUtilities/Environment 36 | - GoogleUtilities/MethodSwizzler (6.2.1): 37 | - GoogleUtilities/Logger 38 | - GoogleUtilities/Network (6.2.1): 39 | - GoogleUtilities/Logger 40 | - "GoogleUtilities/NSData+zlib" 41 | - GoogleUtilities/Reachability 42 | - "GoogleUtilities/NSData+zlib (6.2.1)" 43 | - GoogleUtilities/Reachability (6.2.1): 44 | - GoogleUtilities/Logger 45 | - GoogleUtilities/UserDefaults (6.2.1): 46 | - GoogleUtilities/Logger 47 | - nanopb (0.3.901): 48 | - nanopb/decode (= 0.3.901) 49 | - nanopb/encode (= 0.3.901) 50 | - nanopb/decode (0.3.901) 51 | - nanopb/encode (0.3.901) 52 | 53 | DEPENDENCIES: 54 | - Firebase/Core 55 | 56 | SPEC REPOS: 57 | https://github.com/cocoapods/specs.git: 58 | - Firebase 59 | - FirebaseAnalytics 60 | - FirebaseCore 61 | - FirebaseInstanceID 62 | - GoogleAppMeasurement 63 | - GoogleUtilities 64 | - nanopb 65 | 66 | SPEC CHECKSUMS: 67 | Firebase: 8432d732974498afd5987e9001a05f90f1a3d625 68 | FirebaseAnalytics: 470ddab7253b21ad5a40bebd4a9903d7ae19386a 69 | FirebaseCore: 68f8a7f50cdae542715d4e86afa37c4067217dcb 70 | FirebaseInstanceID: f20243a1d828e0e9a3798b995174dedc16f1b32a 71 | GoogleAppMeasurement: a35a645835bae31b6bdc0576396bc23908f12a22 72 | GoogleUtilities: c7a0b08bda3bf808be823ed151f0e28ac6866e71 73 | nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48 74 | 75 | PODFILE CHECKSUM: d9ee943fa9151e7c0884946b20ed8b3c8126f427 76 | 77 | COCOAPODS: 1.7.3 78 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FirebaseEnvironmentsDemo 2 | 3 | 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. 4 | 5 | ## Getting Started 6 | 7 | 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 current build configuration. 8 | 9 | ### Areas of Interest 10 | 11 | #### `Firebase/Dev` and `Firebase/Prod` folders. 12 | 13 | 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. 14 | 15 | ![firebase/dev and firebase/prod folders](./Images/firebase_dev-firebae_prod-folders.png) 16 | 17 | ![GoogleService-Info.plist not part of target](./Images/not-part-of-target.png) 18 | 19 | #### "Setup Firebase Environment GoogleService-Info.plist" Run Script Build Phase 20 | 21 | 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. 22 | 23 | ![setup firebase environment run script](./Images/setup-firebase-environment-run-script.png) 24 | 25 | ### Prerequisites 26 | 27 | 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: 28 | 29 | ``` 30 | gem install cocoapods 31 | ``` 32 | 33 | ### Project Setup 34 | 35 | Clone or download the sample project and then run the following command to let CocoaPods install the Firebase SDK and setup the Xcode workspace: 36 | 37 | ``` 38 | pod install 39 | ``` 40 | 41 | ## Seeing the Script in Action 42 | 43 | ### Run the App 44 | 45 | The sample app is configured to display the contents of the `GOOGLE_APP_ID` key in the `GoogleService-Info.plist`. Open `FirebaseEnvironmentsDemo.xcworkspace` and hit `CMD` + `R` to run the sample app. By default, the app will build and run using the `Debug` build configuration and the contents on the screen will reflect the "dev" App ID. 46 | 47 | ![run app debug configuration](./Images/run-app-debug.png) 48 | 49 | Next, change the Build Configuration used for the scheme's "Run" action from "Debug" to "Release". 50 | 51 | ![change build configuration to release](./Images/change-scheme-release.png) 52 | 53 | Hit `CMD` + `R` to run the app again. Notice the "prod" App ID is now displayed. 54 | 55 | ![run app release configuration](./Images/run-app-release.png) 56 | 57 | ### Verifying Manually 58 | 59 | You can also manually inspect the contents of the `FirebaseEnvironmentsDemo.app` build product to check the values in the bundled `GoogleService-Info.plist`. Initially, the values should match those of the `GoogleService-Info.plist` inside of the `Firebase/Dev` folder in the Xcode project. 60 | 61 | ![show package contents](./Images/show-package-contents.png) 62 | 63 | After switching the scheme to "Release" and building the project again, you should see that the `GoogleService-Info.plist` contained in `FirebaseEnvironmentsDemo.app` corresponds to the `GoogleService-Info.plist` in the `Firebase/Prod` folder. 64 | 65 | ## Built With 66 | 67 | At the time of writing, the sample project uses the following technologies: 68 | 69 | * Xcode 10.2.1 70 | * CocoaPods 1.7.3 71 | * Firebase iOS SDK 6.3.0 72 | 73 | ## License 74 | 75 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 76 | 77 | ## Acknowledgments 78 | 79 | * [cohenadair's firebase-sandbox gist](https://gist.github.com/cohenadair/3a2aff5084603bfa65824f09cf74206e) 80 | * This has some great info, but suggests manually configuring the Firebase SDK instance at application launch to use the appropriate `GoogleService-Info.plist`. I noticed that the [Firebase documentation](https://firebase.google.com/docs/configure/#support_multiple_environments_in_your_ios_application) acknowledges this approach, but doesn't recommend it in [certain scenarios](https://firebase.google.com/docs/configure/#reliable-analytics). This is my inspiration for creating this guide. 81 | -------------------------------------------------------------------------------- /FirebaseEnvironmentsDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1B9F34506E059D66C67FED1E /* Pods_FirebaseEnvironmentsDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 120BFB588ECE6A1DAE19037C /* Pods_FirebaseEnvironmentsDemo.framework */; }; 11 | 601A893E1F2BA27B001F782C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601A893D1F2BA27B001F782C /* AppDelegate.swift */; }; 12 | 601A89401F2BA27B001F782C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601A893F1F2BA27B001F782C /* ViewController.swift */; }; 13 | 601A89431F2BA27B001F782C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 601A89411F2BA27B001F782C /* Main.storyboard */; }; 14 | 601A89451F2BA27B001F782C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 601A89441F2BA27B001F782C /* Assets.xcassets */; }; 15 | 601A89481F2BA27B001F782C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 601A89461F2BA27B001F782C /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 120BFB588ECE6A1DAE19037C /* Pods_FirebaseEnvironmentsDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseEnvironmentsDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 1366F9211DC180DD4B0B49E4 /* Pods-FirebaseEnvironmentsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseEnvironmentsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseEnvironmentsDemo/Pods-FirebaseEnvironmentsDemo.release.xcconfig"; sourceTree = ""; }; 21 | 601A893A1F2BA27B001F782C /* FirebaseEnvironmentsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FirebaseEnvironmentsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 601A893D1F2BA27B001F782C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 601A893F1F2BA27B001F782C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 24 | 601A89421F2BA27B001F782C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | 601A89441F2BA27B001F782C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 601A89471F2BA27B001F782C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27 | 601A89491F2BA27B001F782C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | 601A89511F2BA845001F782C /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 29 | 601A89531F2BA845001F782C /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 30 | 922E9CC0DC073865A395E1FB /* Pods-FirebaseEnvironmentsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseEnvironmentsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseEnvironmentsDemo/Pods-FirebaseEnvironmentsDemo.debug.xcconfig"; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 601A89371F2BA27B001F782C /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | 1B9F34506E059D66C67FED1E /* Pods_FirebaseEnvironmentsDemo.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 0ACA22F5826152DFCB2614A1 /* Pods */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 922E9CC0DC073865A395E1FB /* Pods-FirebaseEnvironmentsDemo.debug.xcconfig */, 49 | 1366F9211DC180DD4B0B49E4 /* Pods-FirebaseEnvironmentsDemo.release.xcconfig */, 50 | ); 51 | name = Pods; 52 | sourceTree = ""; 53 | }; 54 | 232208DECABF0E6C176E2F25 /* Frameworks */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | 120BFB588ECE6A1DAE19037C /* Pods_FirebaseEnvironmentsDemo.framework */, 58 | ); 59 | name = Frameworks; 60 | sourceTree = ""; 61 | }; 62 | 601A89311F2BA27B001F782C = { 63 | isa = PBXGroup; 64 | children = ( 65 | 601A893C1F2BA27B001F782C /* FirebaseEnvironmentsDemo */, 66 | 601A893B1F2BA27B001F782C /* Products */, 67 | 0ACA22F5826152DFCB2614A1 /* Pods */, 68 | 232208DECABF0E6C176E2F25 /* Frameworks */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | 601A893B1F2BA27B001F782C /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 601A893A1F2BA27B001F782C /* FirebaseEnvironmentsDemo.app */, 76 | ); 77 | name = Products; 78 | sourceTree = ""; 79 | }; 80 | 601A893C1F2BA27B001F782C /* FirebaseEnvironmentsDemo */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 601A893D1F2BA27B001F782C /* AppDelegate.swift */, 84 | 601A893F1F2BA27B001F782C /* ViewController.swift */, 85 | 601A89411F2BA27B001F782C /* Main.storyboard */, 86 | 601A89441F2BA27B001F782C /* Assets.xcassets */, 87 | 601A89461F2BA27B001F782C /* LaunchScreen.storyboard */, 88 | 601A89491F2BA27B001F782C /* Info.plist */, 89 | 601A894F1F2BA845001F782C /* Firebase */, 90 | ); 91 | path = FirebaseEnvironmentsDemo; 92 | sourceTree = ""; 93 | }; 94 | 601A894F1F2BA845001F782C /* Firebase */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 601A89501F2BA845001F782C /* Dev */, 98 | 601A89521F2BA845001F782C /* Prod */, 99 | ); 100 | path = Firebase; 101 | sourceTree = ""; 102 | }; 103 | 601A89501F2BA845001F782C /* Dev */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 601A89511F2BA845001F782C /* GoogleService-Info.plist */, 107 | ); 108 | path = Dev; 109 | sourceTree = ""; 110 | }; 111 | 601A89521F2BA845001F782C /* Prod */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 601A89531F2BA845001F782C /* GoogleService-Info.plist */, 115 | ); 116 | path = Prod; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 601A89391F2BA27B001F782C /* FirebaseEnvironmentsDemo */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 601A894C1F2BA27B001F782C /* Build configuration list for PBXNativeTarget "FirebaseEnvironmentsDemo" */; 125 | buildPhases = ( 126 | C8E38F46DC6D16E7B591F1E8 /* [CP] Check Pods Manifest.lock */, 127 | 601A89361F2BA27B001F782C /* Sources */, 128 | 601A89371F2BA27B001F782C /* Frameworks */, 129 | 60DCDCB11F2BAE48008EE887 /* Setup Firebase Environment GoogleService-Info.plist */, 130 | 601A89381F2BA27B001F782C /* Resources */, 131 | A76EB8FE32F0898247BE42CF /* [CP] Embed Pods Frameworks */, 132 | ); 133 | buildRules = ( 134 | ); 135 | dependencies = ( 136 | ); 137 | name = FirebaseEnvironmentsDemo; 138 | productName = FirebaseEnvironmentsDemo; 139 | productReference = 601A893A1F2BA27B001F782C /* FirebaseEnvironmentsDemo.app */; 140 | productType = "com.apple.product-type.application"; 141 | }; 142 | /* End PBXNativeTarget section */ 143 | 144 | /* Begin PBXProject section */ 145 | 601A89321F2BA27B001F782C /* Project object */ = { 146 | isa = PBXProject; 147 | attributes = { 148 | LastSwiftUpdateCheck = 0830; 149 | LastUpgradeCheck = 1020; 150 | ORGANIZATIONNAME = "Bottle Rocket Studios"; 151 | TargetAttributes = { 152 | 601A89391F2BA27B001F782C = { 153 | CreatedOnToolsVersion = 8.3.3; 154 | DevelopmentTeam = 54HD5B42AY; 155 | LastSwiftMigration = 1020; 156 | ProvisioningStyle = Automatic; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 601A89351F2BA27B001F782C /* Build configuration list for PBXProject "FirebaseEnvironmentsDemo" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = en; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 601A89311F2BA27B001F782C; 169 | productRefGroup = 601A893B1F2BA27B001F782C /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 601A89391F2BA27B001F782C /* FirebaseEnvironmentsDemo */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 601A89381F2BA27B001F782C /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 601A89481F2BA27B001F782C /* LaunchScreen.storyboard in Resources */, 184 | 601A89451F2BA27B001F782C /* Assets.xcassets in Resources */, 185 | 601A89431F2BA27B001F782C /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 60DCDCB11F2BAE48008EE887 /* Setup Firebase Environment GoogleService-Info.plist */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Setup Firebase Environment GoogleService-Info.plist"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "# Name of the resource we're selectively copying\nGOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist\n\n# Get references to dev and prod versions of the GoogleService-Info.plist\n# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)\nGOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST}\nGOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Prod/${GOOGLESERVICE_INFO_PLIST}\n\n# Make sure the dev version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}\"\nif [ ! -f $GOOGLESERVICE_INFO_DEV ]\nthen\necho \"No Development GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\nexit 1\nfi\n\n# Make sure the prod version of GoogleService-Info.plist exists\necho \"Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}\"\nif [ ! -f $GOOGLESERVICE_INFO_PROD ]\nthen\necho \"No Production GoogleService-Info.plist found. Please ensure it's in the proper directory.\"\nexit 1\nfi\n\n# Get a reference to the destination location for the GoogleService-Info.plist\nPLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app\necho \"Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}\"\n\n# Copy over the prod GoogleService-Info.plist for Release builds\nif [ \"${CONFIGURATION}\" == \"Release\" ]\nthen\necho \"Using ${GOOGLESERVICE_INFO_PROD}\"\ncp \"${GOOGLESERVICE_INFO_PROD}\" \"${PLIST_DESTINATION}\"\nelse\necho \"Using ${GOOGLESERVICE_INFO_DEV}\"\ncp \"${GOOGLESERVICE_INFO_DEV}\" \"${PLIST_DESTINATION}\"\nfi\n"; 205 | }; 206 | A76EB8FE32F0898247BE42CF /* [CP] Embed Pods Frameworks */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | "${PODS_ROOT}/Target Support Files/Pods-FirebaseEnvironmentsDemo/Pods-FirebaseEnvironmentsDemo-frameworks.sh", 213 | "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", 214 | "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", 215 | ); 216 | name = "[CP] Embed Pods Frameworks"; 217 | outputPaths = ( 218 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", 219 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | shellPath = /bin/sh; 223 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FirebaseEnvironmentsDemo/Pods-FirebaseEnvironmentsDemo-frameworks.sh\"\n"; 224 | showEnvVarsInLog = 0; 225 | }; 226 | C8E38F46DC6D16E7B591F1E8 /* [CP] Check Pods Manifest.lock */ = { 227 | isa = PBXShellScriptBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | inputPaths = ( 232 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 233 | "${PODS_ROOT}/Manifest.lock", 234 | ); 235 | name = "[CP] Check Pods Manifest.lock"; 236 | outputPaths = ( 237 | "$(DERIVED_FILE_DIR)/Pods-FirebaseEnvironmentsDemo-checkManifestLockResult.txt", 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | shellPath = /bin/sh; 241 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 242 | showEnvVarsInLog = 0; 243 | }; 244 | /* End PBXShellScriptBuildPhase section */ 245 | 246 | /* Begin PBXSourcesBuildPhase section */ 247 | 601A89361F2BA27B001F782C /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | 601A89401F2BA27B001F782C /* ViewController.swift in Sources */, 252 | 601A893E1F2BA27B001F782C /* AppDelegate.swift in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXVariantGroup section */ 259 | 601A89411F2BA27B001F782C /* Main.storyboard */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | 601A89421F2BA27B001F782C /* Base */, 263 | ); 264 | name = Main.storyboard; 265 | sourceTree = ""; 266 | }; 267 | 601A89461F2BA27B001F782C /* LaunchScreen.storyboard */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | 601A89471F2BA27B001F782C /* Base */, 271 | ); 272 | name = LaunchScreen.storyboard; 273 | sourceTree = ""; 274 | }; 275 | /* End PBXVariantGroup section */ 276 | 277 | /* Begin XCBuildConfiguration section */ 278 | 601A894A1F2BA27B001F782C /* Debug */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_ANALYZER_NONNULL = YES; 283 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 289 | CLANG_WARN_BOOL_CONVERSION = YES; 290 | CLANG_WARN_COMMA = YES; 291 | CLANG_WARN_CONSTANT_CONVERSION = YES; 292 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 293 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 294 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 295 | CLANG_WARN_EMPTY_BODY = YES; 296 | CLANG_WARN_ENUM_CONVERSION = YES; 297 | CLANG_WARN_INFINITE_RECURSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 300 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 301 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 303 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 304 | CLANG_WARN_STRICT_PROTOTYPES = YES; 305 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 306 | CLANG_WARN_UNREACHABLE_CODE = YES; 307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 308 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 309 | COPY_PHASE_STRIP = NO; 310 | DEBUG_INFORMATION_FORMAT = dwarf; 311 | ENABLE_STRICT_OBJC_MSGSEND = YES; 312 | ENABLE_TESTABILITY = YES; 313 | GCC_C_LANGUAGE_STANDARD = gnu99; 314 | GCC_DYNAMIC_NO_PIC = NO; 315 | GCC_NO_COMMON_BLOCKS = YES; 316 | GCC_OPTIMIZATION_LEVEL = 0; 317 | GCC_PREPROCESSOR_DEFINITIONS = ( 318 | "DEBUG=1", 319 | "$(inherited)", 320 | ); 321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 323 | GCC_WARN_UNDECLARED_SELECTOR = YES; 324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 325 | GCC_WARN_UNUSED_FUNCTION = YES; 326 | GCC_WARN_UNUSED_VARIABLE = YES; 327 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 328 | MTL_ENABLE_DEBUG_INFO = YES; 329 | ONLY_ACTIVE_ARCH = YES; 330 | SDKROOT = iphoneos; 331 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 332 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 333 | }; 334 | name = Debug; 335 | }; 336 | 601A894B1F2BA27B001F782C /* Release */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 343 | CLANG_CXX_LIBRARY = "libc++"; 344 | CLANG_ENABLE_MODULES = YES; 345 | CLANG_ENABLE_OBJC_ARC = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 351 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 352 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNREACHABLE_CODE = YES; 365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 366 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 367 | COPY_PHASE_STRIP = NO; 368 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 369 | ENABLE_NS_ASSERTIONS = NO; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_NO_COMMON_BLOCKS = YES; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 380 | MTL_ENABLE_DEBUG_INFO = NO; 381 | SDKROOT = iphoneos; 382 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 383 | VALIDATE_PRODUCT = YES; 384 | }; 385 | name = Release; 386 | }; 387 | 601A894D1F2BA27B001F782C /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 922E9CC0DC073865A395E1FB /* Pods-FirebaseEnvironmentsDemo.debug.xcconfig */; 390 | buildSettings = { 391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 392 | DEVELOPMENT_TEAM = 54HD5B42AY; 393 | INFOPLIST_FILE = FirebaseEnvironmentsDemo/Info.plist; 394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 395 | PRODUCT_BUNDLE_IDENTIFIER = com.bottlerocketstudios.FirebaseEnvironmentsDemo; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | SWIFT_VERSION = 5.0; 398 | }; 399 | name = Debug; 400 | }; 401 | 601A894E1F2BA27B001F782C /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = 1366F9211DC180DD4B0B49E4 /* Pods-FirebaseEnvironmentsDemo.release.xcconfig */; 404 | buildSettings = { 405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 406 | DEVELOPMENT_TEAM = 54HD5B42AY; 407 | INFOPLIST_FILE = FirebaseEnvironmentsDemo/Info.plist; 408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 409 | PRODUCT_BUNDLE_IDENTIFIER = com.bottlerocketstudios.FirebaseEnvironmentsDemo; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | SWIFT_VERSION = 5.0; 412 | }; 413 | name = Release; 414 | }; 415 | /* End XCBuildConfiguration section */ 416 | 417 | /* Begin XCConfigurationList section */ 418 | 601A89351F2BA27B001F782C /* Build configuration list for PBXProject "FirebaseEnvironmentsDemo" */ = { 419 | isa = XCConfigurationList; 420 | buildConfigurations = ( 421 | 601A894A1F2BA27B001F782C /* Debug */, 422 | 601A894B1F2BA27B001F782C /* Release */, 423 | ); 424 | defaultConfigurationIsVisible = 0; 425 | defaultConfigurationName = Release; 426 | }; 427 | 601A894C1F2BA27B001F782C /* Build configuration list for PBXNativeTarget "FirebaseEnvironmentsDemo" */ = { 428 | isa = XCConfigurationList; 429 | buildConfigurations = ( 430 | 601A894D1F2BA27B001F782C /* Debug */, 431 | 601A894E1F2BA27B001F782C /* Release */, 432 | ); 433 | defaultConfigurationIsVisible = 0; 434 | defaultConfigurationName = Release; 435 | }; 436 | /* End XCConfigurationList section */ 437 | }; 438 | rootObject = 601A89321F2BA27B001F782C /* Project object */; 439 | } 440 | --------------------------------------------------------------------------------