inehemiasm/AiAssistant / .agents/skills/firebase-remote-config-basics
firebase-remote-config-basics
VerifiedComprehensive guide for Firebase Remote Config, including template management and SDK usage. Use this skill when the user needs help setting up Remote Config, managing feature flags, or updating app behavior dynamically.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.7 KB |
| references/android_setup.md | markdown | 3.4 KB |
| references/ios_setup.md | markdown | 2.7 KB |
references/ios_setup.md
View on GitHub# Firebase Remote Config iOS Setup Guide
Important references:
- Refer to the `firebase-basics` skills, particularly those for iOS setup, before proceeding.
- Refer to the `xcode-project-setup` skills.
## Project and App Setup
Use the `firebase-tools` CLI to set up the project if necessary.
1. **Find Bundle ID:** Read the Xcode project to find the iOS bundle ID. Check the `PRODUCT_BUNDLE_IDENTIFIER` value in the `.pbxproj` file or the `Info.plist` file.
2. **Create Firebase Project:** If no project exists, create one:
`npx -y firebase-tools@latest projects:create <project-id> --display-name="My Awesome App"`
3. **Create Firebase App:** Register the iOS app with the discovered bundle ID:
`npx -y firebase-tools@latest apps:create IOS <bundle-id>`
4. **Link the GoogleService-Info.plist file:** Use the script in the `xcode-project-setup` skill to obtain the config and link.
## Add Swift Package Dependencies
Install the Remote Config and Analytics SDKs using the Swift package manager.
Install the `FirebaseRemoteConfig` and `FirebaseAnalytics` packages from the [https://github.com/firebase/firebase-ios-sdk.git](https://github.com/firebase/firebase-ios-sdk.git) repository.
## Initialize Firebase in App Code
Modify the application's entry point to initialize Firebase. Refer to the iOS setup reference in the firebase-basics skill.
## Follow up Steps
The following steps cover the essential patterns for using Remote Config effectively in your iOS app.
### Set In-App Defaults
Define default values so your app behaves as intended before it connects to the backend. Create a property list file (e.g., RemoteConfigDefaults.plist):
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>welcome_message</key>
<string>Welcome to the app!</string>
<key>is_feature_enabled</key>
<false/>
</dict>
</plist>
```
Then, initialize the SDK and set the defaults:
```swift
import FirebaseRemoteConfig
let remoteConfig = RemoteConfig.remoteConfig()
remoteConfig.setDefaults(fromPlist: "RemoteConfigDefaults")
```
### Fetch and Activate Values
To retrieve values from the cloud and apply them to your app:
```swift
remoteConfig.fetchAndActivate { (status, error) in
if status == .successFetchedFromRemote || status == .successUsingPreFetchedData {
print("Config fetched and activated!")
} else {
print("Config not fetched")
}
// Access a value
let message = remoteConfig.configValue(forKey: "welcome_message").stringValue
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |