Skip to content

Releases: gameballers/gameball-react-native

Gameball Android SDK v3.1.2

08 Apr 15:43

Choose a tag to compare

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.1.2

Release Date: April 8, 2026
Version: 3.1.2
Type: Patch Release


🎉 What's New

v3.1.2 fixes a widget loading delay caused by srcdoc iframe blocking and replaces the profile widget's modal with a custom animated implementation. All existing code continues to work without modifications.

Widget Loading Fix

The profile widget no longer experiences loading delays caused by blocked about:blank iframe origins. The widget now opens instantly with a smooth spring animation.

Custom Animated Modal

The profile widget's modal (previously using react-native-modal) has been replaced with a lightweight custom implementation:

  • Slide-up spring animation on open
  • Tappable backdrop to dismiss
  • Lazy WebView rendering — the widget isn't loaded until first open
  • WebView reloads on re-open to ensure fresh content

🔄 Changes

  • Fixed widget loading delay caused by srcdoc iframe about:blank origin blocking
  • Replaced react-native-modal usage in profile widget with custom Animated slide-up modal
  • Widget WebView is lazily rendered on first open
  • WebView reloads on subsequent opens for fresh content
  • Added about:* to allowed WebView origins

Requirements

  • React Native 0.70.0+
  • TypeScript 4.0+
  • Node.js 18.0+
  • iOS 12.0+
  • Android API 21+

Migration

No changes required. Existing v3.1.1, v3.1.0, and v3.0.0 code works without modifications.

The profile widget no longer uses react-native-modal internally, but the dependency is still required by in-app notifications.

See MIGRATION.md for details.


Installation

npm install react-native-gameball@^3.1.2
# or
yarn add react-native-gameball@^3.1.2

Support


Previous Release: v3.1.1

Release Date: December 15, 2025
Version: 3.1.1
Type: Patch Release


What's New

Gameball React Native SDK v3.1.1 adds guest mode support for the profile widget, allowing users to explore loyalty features before signing up.

🐛 Fixed

  • Guest mode support — profile widget can now be displayed without customer authentication
  • ShowProfileRequest.customerId is now optional, defaulting to null for guest mode

🛠️ Developer Experience

  • Simpler API — show profile widget without customer ID for guest mode
  • Flexible usage — support for preview/showcase scenarios before user registration

Previous Release: v3.1.0

Release Date: November 5, 2025
Version: 3.1.0
Type: Feature Release


What's New

Gameball React Native SDK v3.1.0 introduces Session Token authentication with per-request override support for enhanced API security and flexibility. This feature release adds optional token-based authentication with automatic secure endpoint routing, plus the ability to override authentication on a per-request basis.

🔒 Security Enhancements

  • Session Token Authentication: Optional token-based authentication mechanism for secure API communication
  • Per-Request Token Override: Control authentication on individual API calls for maximum flexibility
  • Automatic Secure Routing: SDK automatically switches from API v4.0 to v4.1 endpoints when session token is provided
  • Secure Header Transmission: X-GB-TOKEN header added to requests when using session token authentication
  • Backward Compatible: Existing implementations continue to work without any changes

🛠️ Developer Experience

  • Simple Configuration: Add sessionToken to your config object to enable secure authentication globally
  • Flexible Control: Override session token on individual method calls for granular authentication control
  • Transparent Security: No code changes required beyond initial configuration
  • Easy Token Management: Pass null to clear session token for specific requests

🐛 Bug Fixes

  • Enum Naming: Updated PushProvider enum to follow TypeScript lowerCamelCase convention (firebase, huawei)

🚀 Key Features

Session Token Authentication

Enable secure authentication by adding the sessionToken parameter to your SDK configuration:

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-session-token'  // Optional: Enable secure authentication
};

await GameballApp.getInstance().init(gameballConfig);

When a session token is provided:

  • All API requests automatically route to secure v4.1 endpoints
  • X-GB-TOKEN header is included in all authenticated requests
  • Enhanced security for customer data and API communications

Per-Request Session Token Override

Override the global session token for individual API calls:

const gameballApp = GameballApp.getInstance();

// Initialize customer with a different session token
await gameballApp.initializeCustomer(
  {
    customerId: 'customer123',
    email: 'user@example.com'
  },
  undefined,  // callback (optional)
  'different-token'  // Override global token
);

// Send an event without authentication (clear token for this request)
await gameballApp.sendEvent(
  {
    customerId: 'customer123',
    events: {
      page_view: {
        page: 'home'
      }
    }
  },
  undefined,  // callback (optional)
  null  // Clear token for this request
);

// Show profile with custom token
await gameballApp.showProfile(
  {
    customerId: 'customer123'
  },
  'session-token'
);

Important Note: The sessionToken parameter always updates the global session token when a method is called. If you provide a token, it becomes the new global token. If you don't provide the parameter (undefined), the global token is cleared. Each method call updates the global token, which is then used for subsequent API calls until changed again.

Standard Configuration (Without Token)

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  shop: 'your-shop-id',      // optional
  platform: 'your-platform'   // optional
};

await GameballApp.getInstance().init(gameballConfig);

⚠️ Breaking Changes

None. This is a backward-compatible feature release. All existing v3.0.0 implementations continue to work without modification.


📈 What's Changed

Security Improvements

  • Enhanced API Security: GB Token authentication adds an additional security layer for sensitive operations
  • Automatic Endpoint Management: Smart routing to secure endpoints when authentication is enabled
  • Secure Token Storage: GB tokens are securely managed via instance variables

🔧 Technical Details

Requirements

  • Minimum React Native: 0.70.0
  • TypeScript: 4.0+
  • Node.js: 18.0+

New Configuration Option

GameballConfig

Parameter Type Required Description
sessionToken string ❌ Optional GB Token for secure authentication

Internal Changes

  • Added conditional API version routing logic in makeRequest() method
  • Header generation now conditionally adds X-GB-TOKEN header when token is present
  • Automatic API version switching logic (v4.0 → v4.1) based on token presence
  • API version constants added (API_V4_0, API_V4_1)

🛡️ Security & Reliability

Authentication Security

  • Optional GB Token: Adds token-based authentication layer when needed
  • Automatic Secure Routing: Transparent upgrade to secure v4.1 endpoints
  • Header Security: Secure transmission of authentication tokens via HTTP headers
  • Token Management: Secure storage and lifecycle management of GB tokens

📚 Upgrading from v3.0.0

No Migration Required

This is a backward-compatible release. Your existing v3.0.0 code will continue to work without any changes.

To Enable GB Token Authentication (Optional)

Simply add the sessionToken parameter to your existing configuration:

// Before (v3.0.0) - Still works in v3.1.0
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en'
};

// After (v3.1.0) - With optional GB Token
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-gb-token'  // Add this line
};

Support


🎯 What's Next

Future Enhancements

  • Enhanced analytics capabilities
  • Additional security features
  • Performance optimizations
  • New integration features

Roadmap

  • Version 3.2.0: Enhanced analytics and reporting
  • Future versions: Continued improvements and new features

📦 Installation

npm

npm install react-native-gameball@^3.1.2
npm install react-native-webview

yarn

yarn add react-native-gameball@^3.1.2
yarn add react-native-webview

GitHub

npm install gameballers/gameball-react-native#release-3.1.2

🏆 Benefits Summary

Enhanced Security: Optional GB Token authentication for sensitive operations
Backward Compatible: Zero migration effort - existing code continues to work
Automatic Routing: Smart endpoint selection based on authentication status
Simple Configuration: One-line ...

Read more

Gameball Android SDK v3.1.1

15 Dec 14:33

Choose a tag to compare

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.1.1

Release Date: December 15, 2025
Version: 3.1.1
Type: Patch Release


🎉 What's New

v3.1.1 adds guest mode support for the profile widget, allowing users to explore loyalty features before signing up. All v3.0.0 and v3.1.0 code continues to work without modifications.

Guest Mode Support

The profile widget now works without requiring customer authentication:

// Show widget without customer ID
const guestRequest = {
  showCloseButton: true,
  closeButtonColor: '#4CAF50'
};

await GameballApp.getInstance().showProfile(guestRequest);

// Authenticated mode
const customerRequest = {
  customerId: 'customer_123',
  showCloseButton: true
};

await GameballApp.getInstance().showProfile(customerRequest);

Simplified API

ShowProfileRequest.customerId is now optional:

// v3.1.0 - customer ID was required
const request = { customerId: 'customer_123' };

// v3.1.1 - customer ID optional
const request = { customerId: 'customer_123' }; // Optional

// Guest mode
const guestRequest = { showCloseButton: true };

🔄 Changes

  • ShowProfileRequest.customerId is now optional
  • Profile widget supports guest mode (no customer ID)

Usage Examples

Conditional Display - Show guest mode for unauthenticated users:

const showLoyaltyWidget = async () => {
  const customerId = getCustomerId(); // Your method

  const profileRequest = customerId
    ? { customerId }
    : { showCloseButton: true }; // Guest mode

  await gameballApp.showProfile(profileRequest);
};

Requirements

  • React Native 0.70.0+
  • TypeScript 4.0+
  • Node.js 18.0+
  • iOS 12.0+
  • Android API 21+

Migration

No changes required. Existing v3.1.0 and v3.0.0 code works without modifications.

See MIGRATION.md for details.


Installation

npm install react-native-gameball@^3.1.1
# or
yarn add react-native-gameball@^3.1.1

Support


Previous Release: v3.1.0

Release Date: November 5, 2025
Version: 3.1.0
Type: Feature Release


What's New

Gameball React Native SDK v3.1.0 introduces Session Token authentication with per-request override support for enhanced API security and flexibility. This feature release adds optional token-based authentication with automatic secure endpoint routing, plus the ability to override authentication on a per-request basis.

🔒 Security Enhancements

  • Session Token Authentication: Optional token-based authentication mechanism for secure API communication
  • Per-Request Token Override: Control authentication on individual API calls for maximum flexibility
  • Automatic Secure Routing: SDK automatically switches from API v4.0 to v4.1 endpoints when session token is provided
  • Secure Header Transmission: X-GB-TOKEN header added to requests when using session token authentication
  • Backward Compatible: Existing implementations continue to work without any changes

🛠️ Developer Experience

  • Simple Configuration: Add sessionToken to your config object to enable secure authentication globally
  • Flexible Control: Override session token on individual method calls for granular authentication control
  • Transparent Security: No code changes required beyond initial configuration
  • Easy Token Management: Pass null to clear session token for specific requests

🐛 Bug Fixes

  • Enum Naming: Updated PushProvider enum to follow TypeScript lowerCamelCase convention (firebase, huawei)

🚀 Key Features

Session Token Authentication

Enable secure authentication by adding the sessionToken parameter to your SDK configuration:

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-session-token'  // Optional: Enable secure authentication
};

await GameballApp.getInstance().init(gameballConfig);

When a session token is provided:

  • All API requests automatically route to secure v4.1 endpoints
  • X-GB-TOKEN header is included in all authenticated requests
  • Enhanced security for customer data and API communications

Per-Request Session Token Override

Override the global session token for individual API calls:

const gameballApp = GameballApp.getInstance();

// Initialize customer with a different session token
await gameballApp.initializeCustomer(
  {
    customerId: 'customer123',
    email: 'user@example.com'
  },
  undefined,  // callback (optional)
  'different-token'  // Override global token
);

// Send an event without authentication (clear token for this request)
await gameballApp.sendEvent(
  {
    customerId: 'customer123',
    events: {
      page_view: {
        page: 'home'
      }
    }
  },
  undefined,  // callback (optional)
  null  // Clear token for this request
);

// Show profile with custom token
await gameballApp.showProfile(
  {
    customerId: 'customer123'
  },
  'session-token'
);

Important Note: The sessionToken parameter always updates the global session token when a method is called. If you provide a token, it becomes the new global token. If you don't provide the parameter (undefined), the global token is cleared. Each method call updates the global token, which is then used for subsequent API calls until changed again.

Standard Configuration (Without Token)

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  shop: 'your-shop-id',      // optional
  platform: 'your-platform'   // optional
};

await GameballApp.getInstance().init(gameballConfig);

⚠️ Breaking Changes

None. This is a backward-compatible feature release. All existing v3.0.0 implementations continue to work without modification.


📈 What's Changed

Security Improvements

  • Enhanced API Security: GB Token authentication adds an additional security layer for sensitive operations
  • Automatic Endpoint Management: Smart routing to secure endpoints when authentication is enabled
  • Secure Token Storage: GB tokens are securely managed via instance variables

🔧 Technical Details

Requirements

  • Minimum React Native: 0.70.0
  • TypeScript: 4.0+
  • Node.js: 18.0+

New Configuration Option

GameballConfig

Parameter Type Required Description
sessionToken string ❌ Optional GB Token for secure authentication

Internal Changes

  • Added conditional API version routing logic in makeRequest() method
  • Header generation now conditionally adds X-GB-TOKEN header when token is present
  • Automatic API version switching logic (v4.0 → v4.1) based on token presence
  • API version constants added (API_V4_0, API_V4_1)

🛡️ Security & Reliability

Authentication Security

  • Optional GB Token: Adds token-based authentication layer when needed
  • Automatic Secure Routing: Transparent upgrade to secure v4.1 endpoints
  • Header Security: Secure transmission of authentication tokens via HTTP headers
  • Token Management: Secure storage and lifecycle management of GB tokens

📚 Upgrading from v3.0.0

No Migration Required

This is a backward-compatible release. Your existing v3.0.0 code will continue to work without any changes.

To Enable GB Token Authentication (Optional)

Simply add the sessionToken parameter to your existing configuration:

// Before (v3.0.0) - Still works in v3.1.0
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en'
};

// After (v3.1.0) - With optional GB Token
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-gb-token'  // Add this line
};

Support


🎯 What's Next

Future Enhancements

  • Enhanced analytics capabilities
  • Additional security features
  • Performance optimizations
  • New integration features

Roadmap

  • Version 3.2.0: Enhanced analytics and reporting
  • Future versions: Continued improvements and new features

📦 Installation

npm

npm install react-native-gameball@^3.1.0
npm install react-native-webview

yarn

yarn add react-native-gameball@^3.1.0
yarn add react-native-webview

GitHub

npm install gameballers/gameball-react-native#release-3.1.0

🏆 Benefits Summary

Enhanced Security: Optional GB Token authentication for sensitive operations
Backward Compatible: Zero migration effort - existing code continues to work
Automatic Routing: Smart endpoint selection based on authentication status
Simple Configuration: One-line addition to enable secure authentication
Flexible: Use token authentication only when needed
Transparent: No code changes beyond initial configuration


⭐ Acknowledgments

We thank our development community for their feedback on security features.


Ready to upgrade? Simply update your dependency to v3.1.0. No migration required!

*For technical support, contact u...

Read more

Gameball Android SDK v3.1.0

05 Nov 14:44

Choose a tag to compare

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.1.0

Release Date: November 5, 2025
Version: 3.1.0
Type: Feature Release


🎉 What's New

Gameball React Native SDK v3.1.0 introduces Session Token authentication with per-request override support for enhanced API security and flexibility. This feature release adds optional token-based authentication with automatic secure endpoint routing, plus the ability to override authentication on a per-request basis.

🔒 Security Enhancements

  • Session Token Authentication: Optional token-based authentication mechanism for secure API communication
  • Per-Request Token Override: Control authentication on individual API calls for maximum flexibility
  • Automatic Secure Routing: SDK automatically switches from API v4.0 to v4.1 endpoints when session token is provided
  • Secure Header Transmission: X-GB-TOKEN header added to requests when using session token authentication
  • Backward Compatible: Existing implementations continue to work without any changes

🛠️ Developer Experience

  • Simple Configuration: Add sessionToken to your config object to enable secure authentication globally
  • Flexible Control: Override session token on individual method calls for granular authentication control
  • Transparent Security: No code changes required beyond initial configuration
  • Easy Token Management: Pass null to clear session token for specific requests

🐛 Bug Fixes

  • Enum Naming: Updated PushProvider enum to follow TypeScript lowerCamelCase convention (firebase, huawei)

🚀 Key Features

Session Token Authentication

Enable secure authentication by adding the sessionToken parameter to your SDK configuration:

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-session-token'  // Optional: Enable secure authentication
};

await GameballApp.getInstance().init(gameballConfig);

When a session token is provided:

  • All API requests automatically route to secure v4.1 endpoints
  • X-GB-TOKEN header is included in all authenticated requests
  • Enhanced security for customer data and API communications

Per-Request Session Token Override

Override the global session token for individual API calls:

const gameballApp = GameballApp.getInstance();

// Initialize customer with a different session token
await gameballApp.initializeCustomer(
  {
    customerId: 'customer123',
    email: 'user@example.com'
  },
  undefined,  // callback (optional)
  'different-token'  // Override global token
);

// Send an event without authentication (clear token for this request)
await gameballApp.sendEvent(
  {
    customerId: 'customer123',
    events: {
      page_view: {
        page: 'home'
      }
    }
  },
  undefined,  // callback (optional)
  null  // Clear token for this request
);

// Show profile with custom token
await gameballApp.showProfile(
  {
    customerId: 'customer123'
  },
  'session-token'
);

Important Note: The sessionToken parameter always updates the global session token when a method is called. If you provide a token, it becomes the new global token. If you don't provide the parameter (undefined), the global token is cleared. Each method call updates the global token, which is then used for subsequent API calls until changed again.

Standard Configuration (Without Token)

const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  shop: 'your-shop-id',      // optional
  platform: 'your-platform'   // optional
};

await GameballApp.getInstance().init(gameballConfig);

⚠️ Breaking Changes

None. This is a backward-compatible feature release. All existing v3.0.0 implementations continue to work without modification.


📈 What's Changed

Security Improvements

  • Enhanced API Security: GB Token authentication adds an additional security layer for sensitive operations
  • Automatic Endpoint Management: Smart routing to secure endpoints when authentication is enabled
  • Secure Token Storage: GB tokens are securely managed via instance variables

🔧 Technical Details

Requirements

  • Minimum React Native: 0.70.0
  • TypeScript: 4.0+
  • Node.js: 18.0+

New Configuration Option

GameballConfig

Parameter Type Required Description
sessionToken string ❌ Optional GB Token for secure authentication

Internal Changes

  • Added conditional API version routing logic in makeRequest() method
  • Header generation now conditionally adds X-GB-TOKEN header when token is present
  • Automatic API version switching logic (v4.0 → v4.1) based on token presence
  • API version constants added (API_V4_0, API_V4_1)

🛡️ Security & Reliability

Authentication Security

  • Optional GB Token: Adds token-based authentication layer when needed
  • Automatic Secure Routing: Transparent upgrade to secure v4.1 endpoints
  • Header Security: Secure transmission of authentication tokens via HTTP headers
  • Token Management: Secure storage and lifecycle management of GB tokens

📚 Upgrading from v3.0.0

No Migration Required

This is a backward-compatible release. Your existing v3.0.0 code will continue to work without any changes.

To Enable GB Token Authentication (Optional)

Simply add the sessionToken parameter to your existing configuration:

// Before (v3.0.0) - Still works in v3.1.0
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en'
};

// After (v3.1.0) - With optional GB Token
const gameballConfig = {
  apiKey: 'your-api-key',
  lang: 'en',
  sessionToken: 'your-secure-gb-token'  // Add this line
};

Support


🎯 What's Next

Future Enhancements

  • Enhanced analytics capabilities
  • Additional security features
  • Performance optimizations
  • New integration features

Roadmap

  • Version 3.2.0: Enhanced analytics and reporting
  • Future versions: Continued improvements and new features

📦 Installation

npm

npm install react-native-gameball@^3.1.0
npm install react-native-webview

yarn

yarn add react-native-gameball@^3.1.0
yarn add react-native-webview

GitHub

npm install gameballers/gameball-react-native#release-3.1.0

🏆 Benefits Summary

Enhanced Security: Optional GB Token authentication for sensitive operations
Backward Compatible: Zero migration effort - existing code continues to work
Automatic Routing: Smart endpoint selection based on authentication status
Simple Configuration: One-line addition to enable secure authentication
Flexible: Use token authentication only when needed
Transparent: No code changes beyond initial configuration


⭐ Acknowledgments

We thank our development community for their feedback on security features.


Ready to upgrade? Simply update your dependency to v3.1.0. No migration required!

For technical support, contact us at support@gameball.co

Gameball Android SDK v3.0.2

29 Sep 15:11

Choose a tag to compare

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 CustomerAttributes with structured customAttributes and additionalAttributes
  • New Event model with nested events object structure
  • New ShowProfileRequest for 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 PushProvider enum)

📈 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

  1. Update SDK initialization to use GameballApp.getInstance().init()
  2. Replace registerCustomer with initializeCustomer + TypeScript interfaces
  3. Update customer attributes to use structured customerAttributes object
  4. Migrate event tracking to new Event interface structure
  5. Update profile widget to use ShowProfileRequest interface

Support


📦 Installation

npm

npm install react-native-gameball@^3.0.2
npm install react-native-webview

yarn

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

Release 2.1.3

30 Jun 16:32

Choose a tag to compare

30-06-2025

Release 2.1.2

30 Jun 16:02

Choose a tag to compare

Release 2.1.1

07 Jan 12:11

Choose a tag to compare

2.1.1 (2024-01-07)

Release 2.1.0

07 Jan 12:06

Choose a tag to compare

2.1.0 (2024-01-07)

Features

  • adding new init func. params (5fd2b66)