Complete testing & documentation for native iOS integration via WebView JavaScript bridge
This interface allows web developers to test and understand all available native iOS features accessible through the WebView JavaScript bridge. Each feature is documented with examples and implementation details.
Follow these steps to get started:
Component | Requirement | Status |
---|---|---|
iOS Version | iOS 11.0+ | Checking... |
WebView Type | WKWebView | Checking... |
Message Handler | WebAppInterface | Checking... |
JavaScript Bridge | window.webkit.messageHandlers | Checking... |
Issue: "iOS Bridge Not Available" message appears
Solution: Ensure you're running this in the iOS app, not a regular browser. Check that WebAppInterface is properly initialized in the iOS code.
Issue: Buttons work but no response is received
Solution: Verify the handleIOSAppResponse function exists globally and check the iOS implementation for the specific method being called.
Access device-specific information including unique identifiers, app version, and push notification tokens. This data is essential for user tracking, analytics, and push notifications.
UUID: This is unique per app installation and will change if the app is reinstalled
FCM Token: Required for Firebase Cloud Messaging. May be null if Firebase is not configured
OneSignal ID: Only available after OneSignal initialization and user subscription
Provide tactile feedback to enhance user experience:
Customize the iOS app's appearance including status bar colors, text colors, and fullscreen mode. These features help create a seamless, branded experience.
Click a color to change the status bar background:
Full Screen: Hides status bar and home indicator. User can swipe to show them temporarily.
Secure Mode: May prevent screenshots on some devices (implementation varies by iOS version).
Color Contrast: Always ensure sufficient contrast between status bar color and text color.
Display various types of notifications to users, from simple toasts to interactive dialogs and push notifications. Choose the right type based on urgency and user interaction needs.
Toast: Brief message that appears and disappears automatically. Non-intrusive.
Snackbar: Appears at the bottom with optional action button. Good for confirmations.
Alert Dialog: Modal dialog that requires user interaction. Use for important messages.
Push Notification: System-level notification. Appears even when app is in background.
Comprehensive security features to protect sensitive content from screenshots, copying, and unauthorized access. Essential for apps handling confidential information like exams, medical records, or financial data.
Default Mode: Protection is automatically enabled for URLs containing: /quizapp/, /courses/, /exam/, /test/, /protected/
Manual Override: Use Enable/Disable buttons to force protection on ALL pages regardless of URL
Reset: Returns to default URL-based protection
โข Enable protection before displaying sensitive content
โข Use CSS classes to mark protected elements
โข Implement server-side validation for critical operations
โข Consider disabling right-click and text selection via CSS
โข Monitor for security violations and log them
Enable users to share content, rate your app, and open external links. These features help with app growth, user engagement, and seamless integration with iOS.
โข Don't ask for reviews too frequently (max 3 times per year)
โข Time the request after positive experiences
โข iOS may not show the dialog if shown recently
โข Users can disable review prompts in Settings
OneSignal integration for advanced push notification features including user segmentation, tags, and external user ID management.
Tags allow you to segment users for targeted notifications:
โข Always set External User ID after user login
โข Use tags to create user segments (e.g., premium users, specific interests)
โข Update tags when user preferences change
โข Phone numbers require SMS permission in OneSignal dashboard
Real-time logging of all iOS bridge communications. Use this to debug issues and understand the flow of data between JavaScript and native iOS code.
Type commands directly in your browser console: