Mobile App Integration
Complete guide to embedding Komo experiences in mobile applications.Important Note: Komo does not provide native iOS or Android SDKs. All mobile integration is done via WebViews - this is the recommended and only supported approach for embedding Komo in mobile apps.Three WebView-based approaches available:
- React Native SDK (recommended for React Native apps) - Uses WebView under the hood
- Direct WebView (simplest for any platform) - Native iOS/Android WebView
- Browser Embed SDK (for advanced hybrid apps) - WebView with JavaScript bridge
Overview
Native iOS & Android Apps
For native iOS (Swift/Objective-C) and native Android (Kotlin/Java) apps, use the Direct WebView method. Komo experiences run in a WebView component - there is no native SDK to import. Why WebViews?- Komo experiences are web-based and optimized for mobile browsers
- WebViews provide full feature support without platform-specific SDKs
- Consistent experience across all platforms
- No app store approval delays for content updates
Three Integration Methods
| Method | Best For | Complexity | Features |
|---|---|---|---|
| React Native SDK | React Native apps | Low | Full feature set, pre-built components |
| Direct WebView | Native iOS/Android, Flutter, etc. | Lowest | Basic embedding, minimal setup |
| Browser Embed SDK | Advanced WebView apps | Medium | Advanced features, JavaScript bridge |
- React Native → Use React Native SDK (Method 1)
- Native iOS (Swift) → Use Direct WebView (Method 2)
- Native Android (Kotlin) → Use Direct WebView (Method 2)
- Flutter → Use Direct WebView (Method 2)
- Other frameworks → Use Direct WebView (Method 2) or Browser Embed SDK (Method 3)
Feature Comparison
| Feature | React Native SDK | Direct WebView | Browser Embed SDK |
|---|---|---|---|
| Card Covers | ✅ Built-in | ❌ Manual | ✅ Built-in |
| Form Prefilling | ✅ Native props | ⚠️ URL params | ✅ JavaScript API |
| Event Listening | ✅ Native callbacks | ❌ Limited | ✅ Full support |
| Auth0/SSO | ✅ Session transfer | ⚠️ Manual | ✅ Session transfer |
| UTM Tracking | ✅ Native props | ⚠️ URL params | ✅ Full support |
| Extension Data | ✅ Native props | ❌ No | ✅ JavaScript API |
| Custom Styling | ✅ Style props | ⚠️ Limited | ✅ CSS/JS |
Method 1: React Native SDK (Recommended)
What is it?
The official@komo-tech/react-native-widgets package provides pre-built React Native components for embedding Komo cards with full feature support including form prefilling, event listening, authentication, and analytics tracking.
Requirements:
- React Native app
react-native-webviewv13.x (peer dependency)- iOS 11+ / Android 5.0+
Installation
Quick Start: KomoCardWidget
TheKomoCardWidget component combines everything - metadata fetching, card cover display, and modal handling.
- Go to Komo Portal → Card Settings → Embed tab
- Click “React Native code” in sidebar
- Copy “Card embed meta URL”
Form Prefilling
Pass user data to prefill forms in the embedded experience:Event Listening
Listen for user interactions and events:form.submitted- User submitted a formprize.won- User won a prizegame.completed- User completed a gamecoupon.redeemed- User redeemed a coupon
UTM Tracking & Analytics
Track campaign attribution:Extension Data
Pass custom data to analytics integrations (no PII):Auth0 Authentication
Enable seamless authentication with Auth0:- Auth0 SSO configured on Komo Hub
- “Force Embed Auth” enabled in Embed SDK settings
- Session transfer token obtained immediately before opening
Advanced: Custom Implementation
Use individual components for full control:Styling & Customization
Customize the appearance:Error Handling
Handle loading and error states:Method 2: Direct WebView (Simplest)
What is it?
The simplest approach - embed Komo using a standard WebView component with the site or card URL. This is the recommended approach for native iOS and Android apps (Swift, Kotlin, Java) as well as Flutter and other frameworks.Note: There is no native iOS SDK or native Android SDK for Komo. WebView is the standard and only approach for embedding in native mobile apps.Best for:
- Native iOS apps (Swift/Objective-C) ← Primary use case
- Native Android apps (Kotlin/Java) ← Primary use case
- Flutter apps
- Quick prototyping
- Simple embedding needs
- When you don’t need advanced features
React Native WebView
iOS (Swift) - Native App Integration
This is the standard way to embed Komo in native iOS apps. There is no separate iOS SDK - WebView is the official integration method.Android (Kotlin) - Native App Integration
This is the standard way to embed Komo in native Android apps. There is no separate Android SDK - WebView is the official integration method.Flutter
URL Structure
Single Card (Recommended):Limitations of Direct WebView
❌ Form prefilling - Limited to URL parameters only❌ Event listening - No native callback support
❌ Auth0 session transfer - Must implement manually
❌ Extension data - Not supported
✅ UTM tracking - Works via URL parameters
✅ Basic display - Full Komo experience renders
Method 3: Browser Embed SDK (Advanced)
What is it?
For advanced use cases, use the Browser Embed SDK within a WebView. Provides JavaScript API for form prefilling, event listening, and authentication - even in mobile WebViews. Best for:- Hybrid apps with WebView
- Advanced WebView implementations
- When you need JS bridge communication
Setup
Include the embed script in HTML loaded by WebView:JavaScript API in WebView
Once loaded, use thekomoEmbed object:
React Native WebView with JS Bridge
Platform-Specific Considerations
iOS
App Transport Security (ATS): Ensure your hub domain is allowed:Android
Hardware Acceleration: Enable for smooth WebView performance:Performance Tips
Optimize Loading:- Use single card pages (not full hub) for faster load
- Enable caching in WebView settings
- Preload metadata when possible
- Dispose WebViews when not visible
- Limit concurrent embedded experiences
- Monitor memory usage on low-end devices
Authentication & SSO
Auth0 in React Native
- Detect user needs authentication
- Obtain fresh session transfer token from Auth0
- Pass to Komo widget
- Token valid for 60 seconds only
Custom Authentication
For non-Auth0 setups, use form prefilling:Testing & Debugging
Development Tips
Enable Debug Mode:Common Issues
White Screen:- Check URL is correct and accessible
- Verify network permissions
- Enable WebView debugging
- Use single card mode
- Enable WebView caching
- Optimize images in Komo
- Verify field Unique IDs match
- Check data types (strings only)
- Ensure form is loaded before prefilling
- Session token must be fresh (< 60s)
- Enable incognito mode for clean sessions
- Check Auth0 configuration in Komo
Best Practices
Do:
- ✅ Use React Native SDK for React Native apps
- ✅ Implement error handling and retry logic
- ✅ Test on real devices, not just simulators
- ✅ Handle authentication token lifecycle properly
- ✅ Use UTM parameters for attribution
- ✅ Optimize images in Komo for mobile
- ✅ Test network connectivity scenarios
Don’t:
- ❌ Hardcode authentication tokens
- ❌ Ignore loading and error states
- ❌ Use full hub URLs when single card will do
- ❌ Forget to handle back button (Android)
- ❌ Disable all WebView security features
- ❌ Assume desktop features work on mobile
Examples by Use Case
E-commerce App
Product Page Contest:Event App
Live Trivia During Event:Loyalty App
Points Redemption:Related Documentation
- React Native Package - NPM documentation
- Developer Docs - Full API reference
Need Help? Contact support@komo.tech for mobile integration assistance.
