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
- Go to Firebase Console
- Create a new project or select existing
- Add Android app with your package name
- Download
google-services.json
2. Install Dependencies
3. Initialize Firebase
4. Get FCM Token
iOS Setup (APNs)
1. Apple Developer Account
- Go to Apple Developer Portal
- Create App ID with Push Notifications capability
- Generate APNs certificate or key
- 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
- Request permission before sending notifications
- Handle token refresh for long-lived apps
- Personalize notifications based on user preferences
- Test thoroughly on both platforms
- Monitor delivery rates and user engagement
Always test notifications on real devices as simulators may not support all notification features.
