A modern Swift framework for intercepting and visualizing network calls in iOS and macOS applications with elegant SwiftUI interface.
- 🕵️ Automatic Network Interception - Captures all URLSession requests seamlessly
- 📱 Shake to Inspect - Shake your device to view network activity
- 🎯 Floating Button - Draggable floating button for easy access
- 🏗️ Clean Architecture - Domain-driven design with clear separation of concerns
- ⚡ Swift 6 Native - Built with latest Swift concurrency features
- 🧪 Comprehensive Testing - Full test coverage with Swift Testing framework
- 🎨 SwiftUI Interface - Modern, responsive UI components
- 📊 Real-time Monitoring - Live network call streaming and analytics
NetLens leverages the latest Swift 6 features for optimal performance and safety:
- ✅ Strict Concurrency - Thread safety by design
- ✅ Actors - Automatic data protection
- ✅ Sendable - Type-safe concurrency
- ✅ @Observable - Modern reactive programming (iOS 17+)
- ✅ AsyncStream - Efficient data streaming
- ✅ Structured Concurrency - Predictable async operations
Add NetLens to your project in Xcode:
- File → Add Package Dependencies
- Enter the repository URL:
https://github.com/sassiwalid/NetLens.git
- Select the version you want to use
Or add it to your Package.swift
:
dependencies: [
.package(url: "https://github.com/sassiwalid/NetLens.git", from: "1.0.0")
]
Requirements
iOS 17.0+ / macOS 14.0+ Xcode 16.0+ Swift 6.0+
🔧 Quick Start Basic Setup
import NetLens
// In your AppDelegate or App.swift
#if DEBUG
NetLens.shared.enable()
#endif
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
- Follow Swift API Design Guidelines
- Use Swift 6 concurrency features
- Maintain Clean Architecture principles
- Write comprehensive tests
- Document public APIs
- Statistics Dashboard - Network performance analytics
- Export Functionality - Export calls to HAR format
- Custom Filters - Advanced filtering options
- Mock Responses - Response mocking for testing
- Network Conditions - Simulate slow networks
- Anomaly Detection - Automatic issue detection
Production Use: NetLens is designed for debugging only. Disable in production builds. Memory Usage: Large numbers of network calls may impact performance.
NetLens is available under the MIT license. See the LICENSE file for more info.
Swift Team for amazing concurrency features SwiftUI for declarative UI framework Community feedback and contributions
🐛 Bug Reports: GitHub Issues 💡 Feature Requests: GitHub Discussions 📧 Contact: [email protected]
⭐ If NetLens helps you, please give it a star! Made with ❤️ and Swift 6