{"id":13795005,"url":"https://github.com/capacitor-community/firebase-remote-config","last_synced_at":"2025-04-22T16:32:16.296Z","repository":{"id":38284626,"uuid":"267678094","full_name":"capacitor-community/firebase-remote-config","owner":"capacitor-community","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-26T23:22:40.000Z","size":449,"stargazers_count":22,"open_issues_count":22,"forks_count":38,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-28T03:32:49.473Z","etag":null,"topics":["capacitor","firebase"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capacitor-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-05-28T19:27:54.000Z","updated_at":"2023-12-12T19:20:34.000Z","dependencies_parsed_at":"2022-08-09T02:30:39.540Z","dependency_job_id":null,"html_url":"https://github.com/capacitor-community/firebase-remote-config","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"capacitor-community/.github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-remote-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-remote-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-remote-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Ffirebase-remote-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capacitor-community","download_url":"https://codeload.github.com/capacitor-community/firebase-remote-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250277272,"owners_count":21404022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitor","firebase"],"created_at":"2024-08-03T23:00:51.059Z","updated_at":"2025-04-22T16:32:15.942Z","avatar_url":"https://github.com/capacitor-community.png","language":"TypeScript","funding_links":[],"categories":["Plugins","Community plugins"],"sub_categories":["Community Plugins"],"readme":"# Capacitor Firebase Remote Config Plugin\n\nCapacitory community plugin for firebase remote config.\n\n## Maintainers\n\n| Maintainer    | GitHub                                      | Social                                           | Sponsoring Company |\n| ------------- | ------------------------------------------- | ------------------------------------------------ | ------------------ |\n| Priyank Patel | [priyankpat](https://github.com/priyankpat) | [@priyankpat\\_](https://twitter.com/priyankpat_) | Ionic              |\n\nMainteinance Status: Actively Maintained\n\n## Installation\n\nTo use npm\n\n```bash\nnpm install @capacitor-community/firebase-remote-config\n```\n\nTo use yarn\n\n```bash\nyarn add @capacitor-community/firebase-remote-config\n```\n\nSync native files\n\n```bash\nnpx cap sync\n```\n\nOn iOS, no further steps are needed.\n\nOn Android, register the plugin in your main activity:\n\n```java\nimport com.getcapacitor.community.firebaserc.FirebaseRemoteConfig;\n\npublic class MainActivity extends BridgeActivity {\n\n  @Override\n  public void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    // Initializes the Bridge\n    this.init(\n        savedInstanceState,\n        new ArrayList\u003cClass\u003c? extends Plugin\u003e\u003e() {\n\n          {\n            // Additional plugins you've installed go here\n            // Ex: add(TotallyAwesomePlugin.class);\n            add(FirebaseRemoteConfig.class);\n          }\n        }\n      );\n  }\n}\n```\n\n## Configuration\n\nDownload appropriate google-services.json or GoogleService-Info.plist and place it in the correct platform app directory.\n\n**For Android**: /android/app\n\n**For iOS**: /ios/App/App\n\n## Examples\n\n[Click here](https://github.com/priyankpat/capacitor-plugins-example/tree/firebase-remote-config) for example on how to implement this plugin\n\nYou can also clone the repository\n\n```bash\ngit clone https://github.com/priyankpat/capacitor-plugins-example\ngit checkout -b firebase-remote-config\n```\n\n## Supported methods\n\n| Name                | Android | iOS | Web |\n| :------------------ | :------ | :-- | :-- |\n| initializeFirebase  | ❌      | ❌  | ✅  |\n| setDefaultWebConfig | ❌      | ❌  | ✅  |\n| initialize          | ✅      | ✅  | ✅  |\n| fetch               | ✅      | ✅  | ✅  |\n| activate            | ✅      | ✅  | ✅  |\n| fetchAndActivate    | ✅      | ✅  | ✅  |\n| getBoolean          | ✅      | ✅  | ✅  |\n| getByteArray        | ✅      | ✅  | ✅  |\n| getNumber           | ✅      | ✅  | ✅  |\n| getString           | ✅      | ✅  | ✅  |\n\n## Usage\n\n```typescript\n// Must import the package once to make sure the web support initializes\nimport \"@capacitor-community/firebase-remote-config\";\n\nimport { Plugins } from \"@capacitor/core\";\n\nconst { FirebaseRemoteConfig } = Plugins;\n\n/**\n * NOTE: Web Platform only!\n * This method will initialize firebase app if not yet initialized.\n * @param firebase configs - from google-service.json or GoogleService-Info.plist\n * @returns void\n */\nFirebaseRemoteConfig.initializeFirebase({\n  apiKey: \"...\",\n  authDomain: \"...\",\n  databaseURL: \"...\",\n  projectId: \"...\",\n  storageBucket: \"...\",\n  messagingSenderId: \"...\",\n  appId: \"...\",\n  measurementId: \"...\",\n});\n\n/**\n * NOTE: Web Platform only!\n * This method will set default remote config values.\n * @param options - key/value params with default values\n * @returns void\n */\nFirebaseRemoteConfig.setDefaultWebConfig({\n  has_sale: false,\n  event_name: \"clearance_event\",\n});\n\n/**\n * This method will configure remote config object instance and set the minimum fetch interval to allow for frequest refreshes.\n * @param minimumFetchIntervalInSeconds - interval in seconds (default: 3600)\n * @returns void\n */\nFirebaseRemoteConfig.initialize({\n  minimumFetchIntervalInSeconds: 3600,\n});\n\n/**\n * This method will execute fetch task to retrieve config\n * @param none\n * @returns void\n */\nFirebaseRemoteConfig.fetch();\n\n/**\n * This method will activate the fetched values making it available for your app\n * @param none\n * @returns void\n */\nFirebaseRemoteConfig.activate();\n\n/**\n * This method will fetch and activate the values making it available for your app\n * @param none\n * @returns void\n */\nFirebaseRemoteConfig.fetchAndActivate();\n\n/**\n * This method will return the parameter value for a given key in boolean\n * @param key - key to obtain boolean value\n * @returns key - key used to obtain value\n *          value - boolean value for a given key\n *          source - Indicates that the source of value retrieved (default, remote, static)\n */\nFirebaseRemoteConfig.getBoolean({\n  key: \"bool key\",\n});\n\n/**\n * This method will return the parameter value for a given key in byte array\n * @param key - key to obtain byte array value\n * @returns key - key used to obtain value\n *          value - byte array value for a given key\n *          source - Indicates that the source of value retrieved (default, remote, static)\n */\nFirebaseRemoteConfig.getByteArray({\n  key: \"array key\",\n});\n\n/**\n * This method will return the parameter value for a given key in double\n * @param key - key to obtain double value\n * @returns key - key used to obtain value\n *          value - double value for a given key\n *          source - Indicates that the source of value retrieved (default, remote, static)\n */\nFirebaseRemoteConfig.getNumber({\n  key: \"number key\",\n});\n\n/**\n * This method will return the parameter value for a given key in string\n * @param key - key to obtain string value\n * @returns key - key used to obtain value\n *          value - string value for a given key\n *          source - Indicates that the source of value retrieved (default, remote, static)\n */\nFirebaseRemoteConfig.getString({\n  key: \"string key\",\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ffirebase-remote-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapacitor-community%2Ffirebase-remote-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Ffirebase-remote-config/lists"}