Skip to content
Back to skills

Add Expo Notifications

ASecurity

Add push + local notifications via expo-notifications, register APNs token, handle taps. Use when the user says 'push notifications', 'expo-notifications', 'APNs', 'notification permission'.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
developmentbashreactapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add khadinakbarlabs/expo-mobile-app-builder --skill add-expo-notifications --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Expo Notifications?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Expo Notifications
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khadinakbarlabs-add-expo-notifications/badge)](https://www.skillsdirectory.com/skills/khadinakbarlabs-add-expo-notifications)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "add-expo-notifications"
description: "Add push + local notifications via expo-notifications, register APNs token, handle taps. Use when the user says 'push notifications', 'expo-notifications', 'APNs', 'notification permission'."
---

# Add Expo Notifications

Local + push notifications. APNs registration, token capture, foreground/background handling.

## Install
```bash
npm exec --no -- expo install expo-notifications expo-device
```

## app.json
```json
{
  "expo": {
    "plugins": [
      ["expo-notifications", {
        "icon": "./assets/notification-icon.png",
        "color": "#ffffff",
        "sounds": ["./assets/notification.wav"]
      }]
    ],
    "ios": {
      "infoPlist": {
        "UIBackgroundModes": ["remote-notification"]
      }
    }
  }
}
```

## Setup + register
```tsx
import * as Notifications from 'expo-notifications';
import * as Device from 'expo-device';
import { useEffect } from 'react';

Notifications.setNotificationHandler({
  handleNotification: async () => ({
    shouldShowBanner: true,
    shouldShowList: true,
    shouldPlaySound: true,
    shouldSetBadge: false,
  }),
});

export function usePushRegistration() {
  useEffect(() => {
    if (!Device.isDevice) return; // simulator can't register

    (async () => {
      const { status: existing } = await Notifications.getPermissionsAsync();
      let final = existing;
      if (existing !== 'granted') {
        const { status } = await Notifications.requestPermissionsAsync();
        final = status;
      }
      if (final !== 'granted') return;

      const token = (await Notifications.getDevicePushTokenAsync()).data; // raw APNs token
      // OR Expo push token: const token = (await Notifications.getExpoPushTokenAsync({ projectId })).data;

      await fetch('/api/register-push', { method: 'POST', body: JSON.stringify({ token }) });
    })();
  }, []);
}
```

## Local notification (no server)
```tsx
await Notifications.scheduleNotificationAsync({
  content: { title: 'Reminder', body: 'Time to log your meal' },
  trigger: { seconds: 3600, repeats: true },
});
```

## Server-side send via APNs Auth Key
Recommended: Expo Push API (free, simple) or direct APNs HTTP/2 with .p8 key.

## Reference
`references/01-expo-sdk-54.md`

Files in this skill

  • SKILL.md2.2 KB
  • agents/openai.yaml197 B
  • references/01-expo-sdk-54.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…