# Simorgh 2.0.0
**Release date:** June 24, 2026
**Merged:** `feature/download-manager` → `main` (PR #5)
Simorgh 2.0.0 is the first release under the new name. The library formerly shipped as **SRNetworkManager**. One package now covers HTTP, WebSocket, subscriptions, background downloads, streaming, uploads, and live network/VPN monitoring — with Combine and async/await APIs and Swift 6 strict-concurrency support.
---
## Highlights
- **Rebrand to Simorgh** — new package/product name, module import, and example app
- **`DownloadManager`** — production download engine with pause/resume, priority queue, batch enqueue, speed/ETA, and background sessions
- **Live VPN detection** — dual `NWPathMonitor` architecture for instant connect/disconnect events
- **7-tab example app** — Posts, Realtime, Subscription, Downloads, Upload, Stream, Network
- **Complete README** — navigable table of contents and full API documentation
---
## Breaking Changes
### Package & module rename
| Before (1.x) | After (2.0) |
|---|---|
| `SRNetworkManager` | **`Simorgh`** |
| `import SRNetworkManager` | `import Simorgh` |
| `SRNetworkManagerTests` | `SimorghTests` |
| Repo/product: SRGenericNetworkLayer | **Simorgh** |
Update `Package.swift`:
```swift
dependencies: [
.package(url: "https://github.com/siamakrostami/Simorgh.git", from: "2.0.0")
]Example app rename
SRNetworkManagerExampleApp→SimorghExampleApp- Open
Example/SimorghExampleApp.xcodeproj
New Features
Download Manager
Built on URLSessionDownloadTask with Combine and async/await APIs.
- True pause/resume via resume data (persisted to disk)
- Priority queue:
critical>high>normal>low - Concurrency cap with automatic queue draining (default: 3)
- Batch enqueue — single call or per-item
fileName+priority - Speed & ETA — 3-second sliding window; auto-scaling display units (B/s → GB/s)
- HTTP validation — non-2xx responses rejected (error bodies not saved as files)
- Duplicate URL guard, disk-space guard, MIME auto-detection
- Percent-encoded filenames decoded automatically
- Background sessions via
backgroundSessionIdentifier - Structured download lifecycle logging (
ENQUEUED,STARTED,PAUSED,COMPLETED,RETRY, …)
let manager = try DownloadManager(config: .default, logLevel: .standard)
let id = try manager.enqueue(url: fileURL, priority: .high)
for await progress in try manager.download(url: fileURL) {
if progress.isCompleted { break }
}Network Monitoring (reachability rewrite)
- Dual
NWPathMonitor— general path + tunnel interface monitor - Instant VPN connect/disconnect detection (even when WiFi stays active)
- Eliminates
getifaddrs()race window - Combine (
monitor.status) and async/await (statusStream()) APIs
Example App
| Tab | Demonstrates |
|---|---|
| Posts | HTTP GET |
| Realtime | WebSocket |
| Subscription | Binance-style subscribe/unsubscribe |
| Downloads | Batch catalog, pause/resume, Quick Look |
| Upload | Multipart upload with progress |
| Stream | HTTP streaming (NDJSON) |
| Network | Live WiFi / Cellular / VPN status |
Documentation
- Collapsible table of contents in README
- Architecture diagram, API reference, production config guide
.github/ABOUT.mdfor GitHub repo description & topics
Improvements (from 1.1.0)
Already on main via PR #4; included in the full Simorgh 2.0.0 stack:
- WebSocket — full-duplex, auto-reconnect, typed messages, ping/pong
- Subscription protocol — Amplify/AppSync-style JSON handshake (Binance, Hasura, AppSync)
- Structured logging — HTTP, WebSocket, subscription, and download events at 4 log levels
- HTTP streaming —
streamRequest/asyncStreamRequest
Bug Fixes
- Download speed always 0 — delta now computed before
downloadedBytesis updated - MIME detector — fixed 12 dead cases, bounds crashes, and logic errors in
MimeTypeDetector - Example app scheme — fixed stale
SRNetworkManagerExampleAppreferences causing No Destinations in Xcode - Legacy cleanup — removed duplicate test targets and unused
SRNetworkManagerstub files
Requirements
- iOS 13+ · macOS 13+ · tvOS 13+ · watchOS 7+
- Swift 5.9+ (Swift 6 supported)
- Xcode 15+
Migration from SRNetworkManager 1.x
// 1. Update dependency URL and version
.package(url: "https://github.com/siamakrostami/Simorgh.git", from: "2.0.0")
// 2. Replace imports everywhere
- import SRNetworkManager
+ import Simorgh
// 3. API surface is unchanged for HTTP, WebSocket, and Subscription
let client = APIClient()
let users: [User] = try await client.request(GetUsersEndpoint())
// 4. Optional — add DownloadManager where needed
let downloads = try DownloadManager()No API changes to existing HTTP/WebSocket/Subscription calls beyond the module rename.
Installation
dependencies: [
.package(url: "https://github.com/siamakrostami/Simorgh.git", from: "2.0.0")
]Full Changelog (since 1.1.0)
feat: DownloadManager — pause/resume, priority queue, background sessionsfeat: batch enqueue, speed/ETA, download lifecycle loggingfeat: example app — Download, Stream, Network Monitor tabsfix: live VPN detection via dual NWPathMonitorfix: download speed calculation, HTTP status validation, percent-encoded filenamesfix: MimeTypeDetector crashes and logic errorschore: rename SRNetworkManager → Simorghdocs: complete README overhaul with TOC and API referencechore: gitignore local dev files (CLAUDE.md, RELEASE_NOTES.md, secrets)chore: fix example app Xcode scheme
Links