Skip to main content

Notification Setup

This guide covers setting up push notifications for both Android (FCM) and iOS (APNs).

Overview

Twigz supports both Firebase Cloud Messaging (FCM) and Apple Push Notifications (APNs) for cross-platform push notifications.

Android Setup (FCM)

1. Firebase Project Setup

  1. Go to Firebase Console
  2. Create a new project or select existing
  3. Add Android app with your package name
  4. Download google-services.json

2. Install Dependencies

3. Initialize Firebase

4. Get FCM Token

iOS Setup (APNs)

1. Apple Developer Account

  1. Go to Apple Developer Portal
  2. Create App ID with Push Notifications capability
  3. Generate APNs certificate or key
  4. Configure your app for push notifications

2. Install Dependencies

3. Request Permission

4. Get APNs Token

Sending Notifications

From Backend

Bulk Notifications

Notification Types

Order Notifications

Price Change Notifications

Testing Notifications

Test Notification

Debug Notifications

Best Practices

  1. Request permission before sending notifications
  2. Handle token refresh for long-lived apps
  3. Personalize notifications based on user preferences
  4. Test thoroughly on both platforms
  5. Monitor delivery rates and user engagement
Always test notifications on real devices as simulators may not support all notification features.