evanca/firebase-in-app-messaging
Use when running in-app message campaigns, triggering/suppressing messages, configuring opt-in data collection, testing on specific devices, or handling message callbacks.
npx skills add https://github.com/evanca/flutter-ai-rules --skill firebase-in-app-messaging
This skill defines how to correctly implement Firebase In-App Messaging in Flutter applications, covering setup, programmatic triggers, privacy controls, testing workflows, and campaign management.
Use this skill when:
flutter pub add firebase_in_app_messaging
import 'package:firebase_in_app_messaging/firebase_in_app_messaging.dart';
Firebase.initializeApp() completes before accessing In-App Messaging.Use Google Analytics events to trigger in-app messages without additional code. For programmatic triggering:
// Trigger a message tied to a custom event
await FirebaseInAppMessaging.instance.triggerEvent("purchase_complete");
class PaymentScreen extends StatefulWidget {
@override
State<PaymentScreen> createState() => _PaymentScreenState();
}
class _PaymentScreenState extends State<PaymentScreen> {
@override
void initState() {
super.initState();
// Suppress messages during payment
FirebaseInAppMessaging.instance.setMessagesSuppressed(true);
}
@override
void dispose() {
// Re-enable messages when leaving payment flow
FirebaseInAppMessaging.instance.setMessagesSuppressed(false);
super.dispose();
}
}
By default, In-App Messaging automatically delivers messages to all targeted users.
Disable automatic collection — iOS (Info.plist):
<key>FirebaseInAppMessagingAutomaticDataCollectionEnabled</key>
<false/>
Disable automatic collection — Android (AndroidManifest.xml):
<meta-data
android:name="firebase_inapp_messaging_auto_data_collection_enabled"
android:value="false" />
Enable for users who opt in at runtime:
// Call after user consents to data collection
Future<void> enableMessaging() async {
await FirebaseInAppMessaging.instance.setAutomaticDataCollectionEnabled(true);
}
// Call if user revokes consent
Future<void> disableMessaging() async {
await FirebaseInAppMessaging.instance.setAutomaticDataCollectionEnabled(false);
}
FIAM.Headless — look for Starting InAppMessaging runtime with Installation ID YOUR_INSTALLATION_ID.-FIRDebugEnabled as a runtime argument in Xcode scheme settings. Look for [Firebase/InAppMessaging][I-IAM180017] in the console.app_open, purchase_complete).Take evanca/firebase-in-app-messaging from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.