Gameball Android SDK v3.0.2
Release Notes - Gameball React Native SDK
This file contains detailed release notes for the latest version. For complete version history, see CHANGELOG.md.
Latest Release: v3.0.2
Release Date: September 29, 2025
Version: 3.0.2
Type: Major Release
π What's New
Gameball React Native SDK v3.0.2 represents a complete modernization with modern React Native architecture, enhanced type safety, and developer-friendly TypeScript interfaces. This major release brings significant improvements to performance, reliability, and developer experience.
π§ Modern React Native Architecture
- Complete TypeScript Migration: Entire SDK rewritten in TypeScript for better performance and type safety
- Singleton Pattern: All request models use intuitive GameballApp.getInstance() with compile-time validation
- Null Safety: Leverages TypeScript's null safety features to prevent runtime crashes
- Promise-based API: Modern async architecture using async/await with optional callback support
π οΈ Enhanced Developer Experience
- Unified API Design: Consistent method signatures and naming conventions
- Better Error Handling: Comprehensive error types with proper callback mechanisms
- IDE Support: Improved auto-completion and IntelliSense support
- Type Safety: Compile-time validation prevents common integration errors
π Improved Functionality
- Enhanced Customer Management: New InitializeCustomerRequest with comprehensive configuration options
- Advanced Event Tracking: Restructured Event system with flexible metadata support
- Profile Widget Enhancements: ShowProfileRequest for detailed widget customization
- Push Notification Support: Integrated Firebase and Huawei push provider handling
π Key Features
Centralized Configuration
const gameballConfig = {
apiKey: 'your-api-key',
lang: 'en', // 'en' or 'ar'
shop: 'your-shop-id', // optional
platform: 'your-platform-id' // optional
};
await GameballApp.getInstance().init(gameballConfig);Customer Initialization with TypeScript Interfaces
const customerRequest = {
customerId: 'unique-customer-id',
email: 'customer@example.com',
customerAttributes: {
displayName: 'John Doe',
customAttributes: {
'tier': 'gold',
'source': 'mobile_app'
}
},
deviceToken: 'firebase-token',
pushProvider: PushProvider.Firebase
};
const response = await GameballApp.getInstance().initializeCustomer(customerRequest);Enhanced Event Tracking
const event = {
customerId: 'unique-customer-id',
events: {
'purchase_completed': {
'amount': 99.99,
'currency': 'USD',
'item_count': 3
}
}
};
await GameballApp.getInstance().sendEvent(event);Flexible Customer Attributes
const customerAttributes = {
displayName: 'John Doe',
firstName: 'John',
lastName: 'Doe',
customAttributes: {
'membership_tier': 'gold',
'favorite_category': 'electronics'
},
additionalAttributes: {
'utm_source': 'mobile_app',
'campaign_id': 'summer2023'
}
};β οΈ Breaking Changes
This is a major release with breaking changes. Migration is required for existing v2.x users.
API Changes
registerCustomer()βinitializeCustomer()with TypeScript interfaces- Method signatures updated to use interface-based requests
- Service method renamed from individual calls to
GameballApp.getInstance()
Model Changes
- Legacy request models β TypeScript interfaces with comprehensive validation
- Enhanced
CustomerAttributeswith structuredcustomAttributesandadditionalAttributes - New
Eventmodel with nestedeventsobject structure - New
ShowProfileRequestfor profile widget customization
Removed Features
- Legacy builder pattern functionality (replaced with TypeScript interfaces)
- Multiple method overloads (replaced with single interface-based methods)
- String-based push providers (replaced with
PushProviderenum)
π Performance Improvements
Optimized Architecture
- Reduced Memory Usage: Eliminated duplicate object creation and unnecessary state management
- Faster Initialization: Streamlined SDK initialization process with singleton pattern
- Better Network Efficiency: Optimized request handling and error management
- Improved Validation: Enhanced input validation prevents invalid API calls
Code Quality
- 165 files changed: 3,247 additions, 1,892 deletions (net +1,355 lines)
- Eliminated Data Duplication: Fixed issues where request data was copied multiple times
- Better Error Handling: Proper callback-based error reporting instead of silent failures
- Type Safety: TypeScript's type system prevents common runtime errors
π§ Technical Details
Requirements
- Minimum React Native: 0.70.0
- Target React Native: Latest
- TypeScript: 4.0+
- Node.js: 18.0+
Dependencies Updated
- react-native-webview: ^13.0.2 (required peer dependency)
- @react-native-async-storage/async-storage: ^1.17.10 (optional)
- Removed legacy dependencies
Internal Improvements
- Unified request/response handling with TypeScript interfaces
- Enhanced AsyncStorage management for better data persistence
- Improved Promise-based usage for async operations
- Better separation of concerns in singleton architecture
π‘οΈ Security & Reliability
Enhanced Validation
- Comprehensive input validation with proper error messages
- Better API key management and validation
- Improved customer ID validation
- Enhanced request data validation with TypeScript
Error Handling
- Specific exception types for different error scenarios
- Proper callback-based error reporting with detailed messages
- Better error logging and debugging support
- Fail-fast validation to catch issues early
Data Protection
- Improved request data handling with type safety
- Better memory management with singleton pattern
- Enhanced null safety with TypeScript
- Proper error message sanitization
π Migration Support
Migration Resources
- Migration Guide: Step-by-step migration instructions from v2.x
- README: Complete usage documentation with TypeScript examples
- Changelog: Detailed list of all changes across versions
Breaking Changes Summary
- Update SDK initialization to use
GameballApp.getInstance().init() - Replace
registerCustomerwithinitializeCustomer+ TypeScript interfaces - Update customer attributes to use structured
customerAttributesobject - Migrate event tracking to new
Eventinterface structure - Update profile widget to use
ShowProfileRequestinterface
Support
- π§ Email: support@gameball.co
- π Documentation: https://docs.gameball.co
- π Issues: GitHub Issues
π¦ Installation
npm
npm install react-native-gameball@^3.0.2
npm install react-native-webviewyarn
yarn add react-native-gameball@^3.0.2
yarn add react-native-webviewπ Benefits Summary
β
Modern Architecture: React Native-first design with TypeScript interfaces
β
Better Developer Experience: Comprehensive type safety with IDE support
β
Enhanced Performance: Optimized internal architecture with singleton pattern
β
Improved Reliability: Better error handling and validation with TypeScript
β
Type Safety: Compile-time validation prevents runtime errors
β
Future-Ready: Modern foundation for upcoming React Native features
β
Comprehensive Documentation: Complete guides and TypeScript examples
β Acknowledgments
We thank our development community for their feedback and contributions that made this release possible. Special thanks to developers who tested the beta versions and provided valuable insights for improving the TypeScript integration and developer experience.
Ready to upgrade? Start with our Migration Guide.
For technical support during migration, contact support@gameball.co