4 articles

Writing

Notes on Swift and Apple's frameworks. Each one starts from an API, goes under it, and ends with code you can ship.

  1. iPhone Duo: Landscape Is the New Portrait

    I thought foldables were abominations. Then I tried the iPhone Duo. The hardware impressed me, but nearly 20 years of portrait habits are harder to unfold.

  2. GOOGLE_SERVICE_INFO_PLIST

    Firebase Configs in iOS: Using xcconfig to Select the Right GoogleService-Info.plist

    Use per-configuration .xcconfig files and a two-line Run Script to copy the right GoogleService-Info.plist into your app bundle — no manual swaps or conditional Firebase setup.

    GOOGLE_SERVICE_INFO_PLIST = Config/Debug/GoogleService-Info.plist
  3. MockURLProtocol

    Mock Network Requests in iOS Unit Tests with URLProtocol

    Mock network requests in iOS unit tests using URLProtocol — no third-party libraries, full control over API responses, and async tests with Swift Testing.

    final class MockURLProtocol: URLProtocol
  4. URLProtocol

    URLProtocol in iOS: Intercepting and Modifying URLSession Requests

    Learn how URLProtocol works in iOS — intercept, mock, and modify URLSession requests with custom Swift implementations. Practical patterns with full code examples.

    class URLProtocol : NSObject