# Add Expo Notifications

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

- **Type:** Skill
- **Install:** `agentstack add skill-khadinakbarlabs-expo-mobile-app-builder-add-expo-notifications`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [khadinakbarlabs](https://agentstack.voostack.com/s/khadinakbarlabs)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [khadinakbarlabs](https://github.com/khadinakbarlabs)
- **Source:** https://github.com/khadinakbarlabs/expo-mobile-app-builder/tree/main/skills/add-expo-notifications
- **Website:** https://khadinakbar.com

## Install

```sh
agentstack add skill-khadinakbarlabs-expo-mobile-app-builder-add-expo-notifications
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Add Expo Notifications

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

## Install
```bash
npx 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`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [khadinakbarlabs](https://github.com/khadinakbarlabs)
- **Source:** [khadinakbarlabs/expo-mobile-app-builder](https://github.com/khadinakbarlabs/expo-mobile-app-builder)
- **License:** MIT
- **Homepage:** https://khadinakbar.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-khadinakbarlabs-expo-mobile-app-builder-add-expo-notifications
- Seller: https://agentstack.voostack.com/s/khadinakbarlabs
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
