How applovin/applovin-max-react-native works
Main Components
a. Client Layer (React Native Application)
• React Native JavaScript bridge
• Main entry points (src/index.ts)
• Different ad type components:
• Banner Ads
• Interstitial Ads
• Rewarded Ads
• Native Ads
• MRec Ads
• App Open Ads
b. Bridge Layer
• Native Modules Bridge
• Event Emitter System
• Type Definitions Interface
c. Platform-Specific Native Implementations
• iOS Implementation (Objective-C/Swift)
• Android Implementation (Java)
d. AppLovin MAX SDK
• Ad Network Mediation
• Ad Serving System
• Analytics & Reporting
Key Relationships to Highlight
• Bidirectional communication between:
• React Native components and native modules
• Native implementations and AppLovin SDK
• Event system flow from SDK to React Native
Specific Elements
a. Components:
• Ad View Components (src/AdView.tsx)
• Native Ad Components (src/nativeAd/*)
• Privacy Controls (src/Privacy.ts)
• Configuration Management (src/types/Configuration.ts)
b. Event System:
• Ad Events (src/types/AdEvent.ts)
• Error Handling (src/types/CMPError.ts)
• Callback System
Implementation Details
• Use rectangles for main components
• Interface definitions between layers
Specific Features to Emphasize
• Multiple ad format support
• Cross-platform compatibility
• Event handling system
• Type safety implementation
• Privacy controls
Remember to include a small overview section explaining the main components and their responsibilities, as this will help other developers understand the system's architecture quickly.