pushfire_sdk 0.1.3
pushfire_sdk: ^0.1.3 copied to clipboard
A lightweight push notification tracking SDK for Firebase.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.3 #
Added #
- Notification Permission Control: Flexible notification permission handling for better user experience
requestNotificationPermissionparameter inPushFireConfigto control automatic permission requestsrequestNotificationPermission()method for manual permission requests at appropriate times- Platform-specific permission handling for iOS, Android, and Web
Enhanced #
-
Permission Management:
- Automatic permission request during SDK initialization (default behavior)
- Option to disable automatic requests for custom UX flows
- Manual permission request method with boolean return value
- Automatic device re-registration when permissions are granted manually
-
Platform-Specific Behavior:
- iOS: Proper Firebase Messaging permission settings for alerts, badges, and sounds
- Android: Runtime permission handling for Android 13+ (API level 33+)
- Web: Browser notification permission requests through Firebase Messaging
-
Developer Experience:
- Comprehensive logging for permission request outcomes
- Graceful handling of permission denial scenarios
- Device registration continues even without notification permissions
- Support for manual permission grants through device settings
Technical Implementation #
- Configuration Options: Added
requestNotificationPermissiontoPushFireConfigclass - Service Enhancement: Updated
DeviceServiceto handle conditional permission requests - SDK Interface: Added public
requestNotificationPermission()method to main SDK interface - Error Handling: Robust permission status checking and logging
Documentation #
- README Updates: Complete notification permission configuration guide
- Code Examples: Detailed examples for automatic and manual permission strategies
- Best Practices: Guidelines for optimal permission request timing and user experience
0.1.2 #
Added #
- Configuration Options: Enhanced SDK configuration with additional parameters
timeoutSecondsparameter for API request timeout configurationenableLoggingparameter for debug logging control
0.1.1 #
Added #
- Authentication Provider Integration: Automatic subscriber management through authentication providers
AuthProviderenum with support forfirebase,supabase, andnoneoptionsauthProviderparameter inPushFireConfigfor configuring authentication integration- Automatic subscriber login/logout based on authentication state changes
Enhanced #
-
Firebase Authentication Integration:
- Automatic listening for
authStateChanges()fromFirebaseAuth.instance - Auto-login with user UID as external ID, plus email, display name, and phone number
- Auto-logout when user signs out of Firebase Authentication
- Automatic listening for
-
Supabase Authentication Integration:
- Automatic listening for
onAuthStateChangeevents from Supabase client - Auto-login with user ID as external ID, plus email, full_name metadata, and phone number
- Auto-logout when user signs out of Supabase Authentication
- Automatic listening for
-
Configuration Options:
- Added
authProviderparameter toPushFireConfigclass - Defaults to
AuthProvider.nonefor manual subscriber management - Comprehensive documentation for all authentication provider options
- Added
Technical Implementation #
- Service Integration: Authentication state listeners integrated into
PushFireSDKImpl - Dependency Management: Support for both
firebase_authandsupabase_flutterpackages - Error Handling: Graceful handling of authentication state changes and edge cases
- Logging: Comprehensive logging for authentication events and state changes
Documentation #
- README Updates: Complete authentication provider configuration guide
- Code Examples: Detailed examples for Firebase, Supabase, and manual configurations
- Configuration Reference: Updated configuration options table with
authProviderparameter
0.1.0 #
Added #
-
Workflow Execution API: Complete workflow execution system with support for immediate and scheduled workflows
createWorkflowExecution()- Advanced method for custom workflow execution requestscreateImmediateWorkflowForSubscribers()- Execute workflows immediately for specific subscriberscreateImmediateWorkflowForSegments()- Execute workflows immediately for specific segmentscreateScheduledWorkflowForSubscribers()- Schedule workflows for future execution targeting subscriberscreateScheduledWorkflowForSegments()- Schedule workflows for future execution targeting segments
-
New Data Models:
WorkflowExecutionRequest- Main request model with validation and JSON serializationWorkflowTarget- Target configuration supporting subscribers and segmentsWorkflowExecutionType- Enum for immediate vs scheduled execution typesWorkflowTargetType- Enum for subscriber vs segment targeting
-
Technical Implementation:
- New
WorkflowServiceclass for API integration and request handling - Comprehensive input validation including UUID format verification
- Proper error handling with
PushFireApiExceptionintegration - Full logging support for debugging and monitoring
- New
-
Developer Experience:
- Updated example application with complete workflow execution demo UI
- Comprehensive documentation with code examples for all workflow methods
- Type-safe API with proper Dart null safety support
0.0.9 #
- Downgraded
package_info_plusdependency to^8.3.0to resolve compatibility issues.
0.0.8 #
- Downgraded
firebase_messagingdependency from^15.2.8to^15.1.0to resolve compatibility issues withfirebase_core_platform_interface5.4.0.
0.0.7 #
- Updated
firebase_messagingdependency from^14.7.9to^15.2.8to resolve compatibility issues withfirebase_core3.x.
0.0.6 #
Changed #
- Downgraded
firebase_messagingdependency from^15.2.9to^14.7.9to resolvefirebase_core_platform_interfaceversion conflicts
0.0.5 - 2025-06-19 #
Changed #
- Updated
firebase_coredependency constraint from^3.15.1to'>=3.14.0 <4.0.0'to resolve version conflicts
0.0.4 - 2025-06-19 #
Changed #
- Updated device_info_plus dependency constraint from ^9.1.1 to '>=9.1.1 <12.0.0' to resolve version conflicts
0.0.2 - 2025-06-19 #
0.0.1 - 2025-06-10 #
Added #
- Initial release of PushFire Flutter SDK
- Basic subscriber management functionality
- Device registration with FCM integration
- Tag management capabilities
- Core API client implementation
- Automatic device registration with FCM integration
- Subscriber management (login, update, logout)
- Tag management (add, update, remove single and multiple tags)
- Configurable SDK with custom API endpoints and settings
- Comprehensive error handling with specific exception types
- Event streams for real-time updates
- Built-in logging system for debugging
- Cross-platform support (iOS and Android)
- Complete API coverage for PushFire service
Features #
-
Device Management
- Automatic device registration on SDK initialization
- FCM token management and refresh handling
- Device information collection (OS, version, manufacturer, etc.)
- Persistent device storage
-
Subscriber Management
- Login/register subscribers with external ID
- Update subscriber information (name, email, phone)
- Logout functionality with data cleanup
- Persistent subscriber storage
-
Tag Management
- Add individual tags to subscribers
- Update existing tag values
- Remove tags from subscribers
- Batch operations for multiple tags
- Error handling for partial failures
-
Configuration
- Customizable API base URL
- API key authentication
- Configurable request timeouts
- Debug logging toggle
-
Error Handling
- Specific exception types for different error scenarios
- Network error handling
- API error handling with status codes
- Configuration validation
-
Event Streams
- Device registration events
- Subscriber login/logout events
- FCM token refresh events
- Real-time status updates
-
Developer Experience
- Comprehensive documentation
- Example application
- TypeScript-style documentation
- Best practices guide
- Troubleshooting guide
Dependencies #
flutter: SDK integrationfirebase_messaging: FCM token managementhttp: API communicationdevice_info_plus: Device information collectionpackage_info_plus: App version informationshared_preferences: Local data persistencelogging: Debug logging system
Platform Support #
- iOS 11.0+
- Android API level 21+
- Flutter 3.0.0+
- Dart 3.0.0+
API Endpoints Covered #
POST /devices- Register devicePATCH /devices/{id}- Update devicePOST /subscribers/login- Login subscriberPATCH /subscribers/{id}- Update subscriberPOST /subscribers/logout- Logout subscriberPOST /subscribers/tags- Add subscriber tagPATCH /subscribers/tags- Update subscriber tagDELETE /subscribers/tags- Remove subscriber tag
Security #
- API key authentication for all requests
- Secure storage of sensitive data
- No hardcoded credentials
- HTTPS-only communication
Performance #
- Efficient API request batching
- Minimal memory footprint
- Optimized for mobile devices
- Background processing support