Skip to content

Instantly share code, notes, and snippets.

@akehoyayoi
Created August 25, 2016 07:57
Show Gist options
  • Select an option

  • Save akehoyayoi/b180221fd8f804d1fa0634512d4264bf to your computer and use it in GitHub Desktop.

Select an option

Save akehoyayoi/b180221fd8f804d1fa0634512d4264bf to your computer and use it in GitHub Desktop.
Firebaseの設定ファイルをスキーマ毎に切り替える ref: http://qiita.com/akehoyayoi@github/items/ca1eea9605642e288664
#if PRODUCTION
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-pro", ofType: "plist")
#elseif STAGING
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-stg", ofType: "plist")
#else
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-dev", ofType: "plist")
#endif
let firebaseOption = FIROptions(contentsOfFile: filePath)
FIRApp.configureWithOptions(firebaseOption)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment