Skip to content

An iOS app that reveals the Question of the Day based on Firebase RemoteConfig values.

License

Notifications You must be signed in to change notification settings

zaimramlan/ios-remote-configs

Repository files navigation

Remote Configs

IDE Platform Language License

A question of the day iOS app to demonstrate realtime remote configuration changes in Firebase.

Example

Features

  1. Written in CleanSwift architecture
  2. Validates realtime question and answer of the day
  3. A RemoteConfigurationWorker.swift that wraps FirebaseRemoteConfig singleton object and to decouple from app's code

Protips/Pitfalls

  1. Default values can be configured using .plist file
  2. Configs fetched needs to be activated before it can be used. Otherwise it will fallback to default values specified
  3. There are 2 functions to fetching remote configurations from Firebase:
    1. fetch(completionHandler:)
      • Caches values on first successful request
      • Caches invalidate itself after 12 hours
    2. fetch(withExpirationDuration:completionHandler:)
      • Invalidates caches when expiry duration exceeded and will fetch directly from Firebase RemoteConfig
      • Caching invalidation & direct fetching are limited to 5 times every 60 minutes per app
      • Afterwards, it will continue using cache until the next hour to prevent app from spamming calls to Firebase RemoteConfig
  4. Caching and throttling happens in app's SDK
  5. Workarounds to caching and throttling:
    1. Delete and reinstall app, or
    2. Switch developerMode to true:
      let remoteConfig = RemoteConfig.remoteConfig()
      let remoteConfigSettings = RemoteConfigSettings(developerModeEnabled: true)
      remoteConfig.configSettings = remoteConfigSettings

About

An iOS app that reveals the Question of the Day based on Firebase RemoteConfig values.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published