Critical Moments Docs
Quick StartHomepageAccount
  • Documentation Home
  • What is Critical Moments?
  • Quick Start
  • Concepts Overview
  • Remote Control / Service
    • Host Config on Github Pages
  • Config File Structure
  • Demo App
  • Homepage & Account
  • 📚Guides
    • Mobile App Toolbox: 13 Features Most Apps Need
    • Reduce App Churn with Notifications
    • Improve your App Store Rating
    • Feature Flags Guide
  • ⏰Notifications
    • Intro to Notifications
    • Notifications Spec
    • Smart Delivery
    • Badges
  • 🎯Conditional Targeting
    • Intro to Conditions
    • Built-in Properties
    • Custom Properties
    • Syntax and Operators
    • Conditional Guides
      • Working with Dates
      • Locations and Weather
      • Event and Property History
  • 🎪Events
    • Event Overview
    • Recommended Events
    • Built-In Events
  • 💬Actions / In App Messaging
    • Actions Overview
    • Modals
      • Modal Content Sections
      • Modal Buttons
      • Modal Images
    • Banners
    • Alerts
    • App Reviews
    • Open Link
    • Custom Actions
    • Conditional Actions
    • Triggers
  • 🎨Themes
    • Theme Overview
    • Built In Themes
  • ⛳Feature Flags
    • Feature Flag Guide
    • Conditional Feature Flags
    • Named Conditions Config
  • 🔑Trustless SaaS
  • 👋Support
  • 👩‍💻SDK API Reference
Powered by GitBook
On this page

Was this helpful?

Config File Structure

Last updated 8 months ago

Was this helpful?

The Critical Moments config file is a web-hosted configuration file, with a JSON structure defining how your events, actions, conditions, and feature flags connect together.

Update Anytime

Signing and deploying a new config file can be done outside of app releases, allowing you to update your app's behaviour without waiting for app reviews, or users to update their builds! This can be very useful for new announcement, outages, bugs, or other unexpected scenarios.

->

Only the web-hosted/signed config file will be used in release builds. The local/unsigned config file is only for development/debug builds.

Be sure to deploy a signed+hosted config and set the URL before releasing your app to the app store.

Config File Structure

The config file has the following top level entities:

  • configVersion [string, required]: always "v1"

  • appId [string, required]: your app's

  • actions [object, optional]: documented in the

  • conditions [object, optional]: documented in

  • triggers [object, optional]: documented in

  • themes [object, optional]: documented in

  • notifications [object, optional]: documented in

  • minAppVersion [string, optional]: the minimum app version number this config file should be used on. If an older app version fetches this file, it will be ignored and Critical Moments will not start. Example: "v1.4.2"

  • minCMVersion [string, optional]: the minimum Critical Moments SDK version number this config file should be used on. If an older SDK version fetches this file, it will be ignored and Critical Moments will not start. Example: "v0.8.1"

Here is a sample of the typical root object in a config file:

{
    "configVersion": "v1",
    "appId": "YOUR_BUNDLE_ID",
    "actions: {...},
    "conditions: {...},
    "triggers": {...},
    "notifications": {...},
    "themes": {...}
}

Read the docs
bundle ID
Actions Overview
Named Conditions
Triggers Overview
Themes Overview
Notifications Spec