Choose Your Platform
iOS
Native Swift/Objective-C SDK
Android
Native Kotlin/Java SDK
React Native
Cross-platform React Native SDK
Flutter
Dart-based Flutter SDK
iOS Integration
- Installation
- Setup
- Usage
- CocoaPods
- Swift Package Manager
Add PostHog to your Then run:
Podfile:Podfile
Android Integration
- Installation
- Setup
- Usage
Add PostHog to your
build.gradle dependencies:build.gradle
React Native Integration
- Installation
- Setup
- Usage
- Expo
- React Native CLI
Flutter Integration
- Installation
- Platform Setup
- Usage
Add to your Then run:
pubspec.yaml:pubspec.yaml
Common Features
All mobile SDKs support these core features:Automatic Event Capture
- App lifecycle events (app opened, backgrounded)
- Screen views (automatically tracked)
- App crashes and errors
Session Replay
Mobile session replay captures screen recordings, touch interactions, and network activity (where supported).Mobile session replay is currently in beta. Check the session replay docs for platform availability.
Group Analytics
Track events for organizations or teams:Privacy & Compliance
Opt Out
All SDKs support opt-out for privacy compliance:Data Masking
Configure what data is captured:Debugging
Enable debug mode to see SDK activity:Best Practices
Initialize Early: Initialize PostHog as early as possible in your app lifecycle to ensure all events are captured.
Test on Real Devices: Always test on physical devices, not just simulators/emulators, to catch platform-specific issues.
Handle Permissions: Some features (like session replay) may require specific permissions. Handle these gracefully in your app.
Flush on Background: Events are automatically flushed when the app goes to background, but you can manually flush if needed.
Platform-Specific Documentation
iOS SDK
Complete iOS SDK documentation
Android SDK
Complete Android SDK documentation
React Native SDK
Complete React Native documentation
Flutter SDK
Complete Flutter SDK documentation
Next Steps
Feature Flags
Learn about mobile feature flag patterns
Session Replay
Configure mobile session replay
Group Analytics
Track B2B metrics by organization
SDK Overview
Explore all available SDKs