Help us improve
Share bugs, ideas, or general feedback.
Implements push notifications for iOS, Android, React Native, and web using Firebase Cloud Messaging and native services. Handles permissions, tokens, background/foreground messages, and channels.
npx claudepluginhub secondsky/claude-skills --plugin push-notification-setupHow this skill is triggered — by the user, by Claude, or both
Slash command
/push-notification-setup:push-notification-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implement push notifications across mobile and web platforms.
Implements push notifications in React Native apps using Expo Notifications, Firebase Cloud Messaging, and APNs. Covers device registration, token management, foreground handling, and tap interactions.
Implements push notifications in Capacitor apps for iOS/Android using Firebase Cloud Messaging (FCM) and APNs. Covers plugin setup, permissions, token registration, event handling, and platform configs.
Implements push notifications using FCM for Android and APNs for iOS, covering setup, channels, payload handling, foreground/background behavior, and rich notifications.
Share bugs, ideas, or general feedback.
Implement push notifications across mobile and web platforms.
import messaging from '@react-native-firebase/messaging';
// Request permission
async function requestPermission() {
const status = await messaging().requestPermission();
if (status === messaging.AuthorizationStatus.AUTHORIZED) {
const token = await messaging().getToken();
await sendTokenToServer(token);
}
}
// Handle foreground messages
messaging().onMessage(async message => {
console.log('Foreground message:', message);
showLocalNotification(message);
});
// Handle background/quit messages
messaging().setBackgroundMessageHandler(async message => {
console.log('Background message:', message);
});
// Handle token refresh
messaging().onTokenRefresh(token => {
sendTokenToServer(token);
});
import UserNotifications
func requestAuthorization() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in
if granted {
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
}
}
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
sendTokenToServer(token)
}
class MyFirebaseService : FirebaseMessagingService() {
override fun onNewToken(token: String) {
sendTokenToServer(token)
}
override fun onMessageReceived(message: RemoteMessage) {
message.notification?.let {
showNotification(it.title, it.body)
}
}
private fun showNotification(title: String?, body: String?) {
val channelId = "default"
val notification = NotificationCompat.Builder(this, channelId)
.setContentTitle(title)
.setContentText(body)
.setSmallIcon(R.drawable.ic_notification)
.build()
NotificationManagerCompat.from(this).notify(0, notification)
}
}