An Expo React Native app that runs olifantenpaadjes.app in a WebView with network interception to capture and log path data.
- WebView Integration: Loads the Olifantenpaadjes app in an embedded browser
- Network Interception: Captures all fetch and XMLHttpRequest calls
- Real-time Logging: Displays network activity in the bottom panel
- Path Data Detection: Automatically highlights requests containing path/route/geo data
- Console Logging: All intercepted data is logged to the console for export
- Node.js >= 20.19.4 (current version has warnings but should work)
- iOS Simulator (Mac) or Android Emulator
- Expo CLI
npm installnpx expo start --iosnpx expo start --androidnpx expo start --web- The app loads
https://olifantenpaadjes.app/in a WebView - JavaScript is injected to intercept:
fetch()API callsXMLHttpRequestcalls
- Intercepted data is sent to React Native via
postMessage - The app displays logs in real-time and writes to console
- Path-related data (URLs containing 'path', 'route', 'olifanten', 'geo', 'coordinate') is highlighted with 🛤️ emoji in console
- Bottom panel shows last 50 network requests
- Each entry shows: timestamp, type (fetch/xhr), and URL
- Open the terminal where
npx expo startis running - Look for entries prefixed with "Network intercept:"
- Path data is highlighted with "🛤️ PATH DATA DETECTED:"
- Use console output for complete JSON data structures
To save intercepted data:
- In the terminal, pipe output to a file:
npx expo start --ios 2>&1 | tee network-logs.txt- Or use Chrome DevTools (for web version):
- Run:
npx expo start --web - Open browser DevTools (F12)
- Go to Console tab
- Right-click on logs → "Save as..."
- Run:
The injected JavaScript intercepts:
- Fetch API: Both requests and responses
- XMLHttpRequest: Open calls and response data
- JSON Parsing: Automatically attempts to parse response data
- Error Handling: Falls back to text if JSON parse fails
The project shows warnings about Node.js version. Update to Node.js 20.19.4+ to eliminate warnings:
nvm install 20.19.4
nvm use 20.19.4- Check internet connection
- Try restarting the emulator
- Clear cache:
npx expo start -c
- The website might use WebSockets (not intercepted)
- Check if the site requires authentication
- Look at the browser console for errors
.
├── App.js # Main app with WebView and interception
├── package.json # Dependencies
├── app.json # Expo configuration
└── assets/ # App assets
expo- React Native frameworkreact-native-webview- WebView componentaxios- HTTP client (available if needed)react-native-web- Web support
- The app keeps only the last 50 log entries in state to prevent memory issues
- All data is also logged to console for complete capture
- Path-related keywords trigger special highlighting in console
- WebView runs with JavaScript and DOM storage enabled
MIT
The tools and technologies used in this project:
If you found this project useful or interesting, consider buying me a coffee!