Skip to content

robvs/RemoteConfigBasics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

RemoteConfigBasics

Basic remote configuration setup using Firebase Remote Config

Getting Started

Setting up Remote Configuration in your project using Firebase is fairly straightforward and easy. The web portal does a great job guiding you through the initial steps.

  1. Go to firebase.google.com
  2. Tap Get Started For Free and follow the prompts to create a new project
  3. Tap Create New Project
  4. Enter your project name & tap Create Project
  5. Once the project is created, you'll land on the Project Overview page
  6. Tap Add Firebase To Your iOS App
  7. Enter your app's bundle id & tap Add App
  8. The GoogleService-Info.plist file should now be in your downloads folder. Copy it into your Xcode project.
  9. Add the Firebase Core and Remote Config frameworks into your project
  • If you're using CocoaPods, add the following lines to your podfile and install

    pod 'Firebase/Core'

    pod 'Firebase/RemoteConfig'

  • If you're not using CocoaPods, you'll need to install it manually

    1. Dowload the Firebase frameworks from the Setup page in Firebase Docs; Look for the Integrate without CocoaPods section
    2. Add all framework files from the Analytics directory to your project
    3. Add the FirebaseRemoteConfig framework to your project
    4. Add Firebase.h to your project
    5. Import Firebase.h in the bridging header
    6. Add module.modulemap to your project
    7. Add the -ObjC flag to Build Settings > Linking > Other Linker Flags
  1. Configure the Firebase SDK and Remote Config singleton in your app
  2. In the AppDelegate class, add the following to application(didFinishLaunchingWithOptions:) FIRApp.configure()
  3. Build to ensure that everything is in place
  4. Create a new Property List file named "RemoteConfigDefault.plist" (or whatever filename works for you)
  5. Add a key/value pair for a configurable element in your app (i.e. "label_1"/"This text came from the Firebase Remote Config portal.")
  6. Implement configuration, fetch and activation in you app
    • See init(), fetchRemoteValues() & activateLastFetch() in RemoteConfigManager.swift
  7. Implement the configurable elements in you app
  • See references to RemoteConfigManager in HomeViewController.swift
  1. Add parameters to the Firebase project console
  2. Navigate to your project's overview page, then go to Remote Config : Get Started
  3. Tap Add Your First Parameter
  4. Enter the same key as the plist file above and a value
  5. Publish changes

Links

Firebase Home

Remote Config Docs

Remote Config on iOS

About

Basic remote configuration setup using Firebase Remote Config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published