The engineering notebook
RSS feediOS
Articles, practical guides, and engineering notes on iOS.
By Ashish Bhakhand 108 published articles
Explore the articles
20 articles
Reset filtersBuilding an iOS Sync Engine with Cursors and Tombstones
Pull incremental changes, preserve deletions, and advance sync progress only after local commits succeed.
SwiftData in an Offline-First Application
Use local persistence as a responsive product capability with explicit freshness, sync, and conflict rules.
Optimistic Chat UI with Idempotent Server Turns
Show messages immediately while reconciling acknowledgements, streamed text, persistence, failures, and safe retries.
Consuming Server-Sent Events in Swift Without Breaking Cancellation
Parse typed SSE frames, expose AsyncSequence events, and stop network and reducer work when the user leaves.
Why Automatic Retries Are Dangerous for Swift API Clients
Retry transient reads with bounded jitter while protecting writes from duplicate business effects.
A Production Swift Networking Layer with URLSession
Centralize authentication, envelopes, correlation IDs, decoding, safe diagnostics, and transport error mapping.
Typed Errors in Swift: User Messages and Telemetry Codes
Model failures by recovery behavior while separating safe UI copy from stable operational identifiers.
Splitting Large TCA Features Without Losing the State Flow
Separate state, actions, reducer logic, and child domains while keeping one understandable feature contract.
One Client Boundary per Feature in TCA
Give reducers a small capability-based dependency while network, persistence, and caching remain implementation details.