<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rob Mulder </title>
    <description>The latest articles on DEV Community by Rob Mulder  (@rm335).</description>
    <link>https://dev.to/rm335</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3967991%2Faac0939b-5cab-4597-8a62-d54b407183e2.jpeg</url>
      <title>DEV Community: Rob Mulder </title>
      <link>https://dev.to/rm335</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rm335"/>
    <language>en</language>
    <item>
      <title>Building an unofficial Dumpert client for Apple TV with Swift 6 and SwiftUI</title>
      <dc:creator>Rob Mulder </dc:creator>
      <pubDate>Thu, 04 Jun 2026 09:37:03 +0000</pubDate>
      <link>https://dev.to/rm335/building-an-unofficial-dumpert-client-for-apple-tv-with-swift-6-and-swiftui-3jnb</link>
      <guid>https://dev.to/rm335/building-an-unofficial-dumpert-client-for-apple-tv-with-swift-6-and-swiftui-3jnb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F599otai6ry7aackoefrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F599otai6ry7aackoefrk.png" alt=" " width="800" height="300"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.dumpert.nl" rel="noopener noreferrer"&gt;Dumpert&lt;/a&gt; is a Dutch video site I've watched for years, but there's never been an Apple TV app, so I built one. &lt;strong&gt;DumpertTV&lt;/strong&gt; is an unofficial, open-source tvOS client. Here's how it's put together and a few things that were more interesting than I expected.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer up front: this project is &lt;strong&gt;not affiliated with Dumpert or DPG Media B.V.&lt;/strong&gt; It's an independent app that uses the public Dumpert API.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Swift 6&lt;/strong&gt; with strict concurrency (&lt;code&gt;complete&lt;/code&gt; mode) across every target&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SwiftUI&lt;/strong&gt; for all UI, tvOS 18+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XcodeGen&lt;/strong&gt; so the &lt;code&gt;.xcodeproj&lt;/code&gt; is generated from a &lt;code&gt;project.yml&lt;/code&gt; and never committed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloudKit&lt;/strong&gt;, &lt;strong&gt;GroupActivities&lt;/strong&gt; (SharePlay), &lt;strong&gt;Vision&lt;/strong&gt;, &lt;strong&gt;AVKit&lt;/strong&gt;, &lt;strong&gt;Swift Testing&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  One actor for the network, one source of truth for the UI
&lt;/h2&gt;

&lt;p&gt;The whole networking layer is an &lt;code&gt;actor&lt;/code&gt;. That makes per-request state like ETags and retry bookkeeping thread-safe without a single lock:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;actor&lt;/span&gt; &lt;span class="kt"&gt;DumpertAPIClient&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;etags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[:]&lt;/span&gt;

    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="n"&gt;fetch&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Decodable&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="nv"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;APIEndpoint&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;throws&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;T&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Exponential backoff on 5xx + network errors; honours 304 Not Modified.&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchWithRetry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The UI reads from a single &lt;code&gt;@Observable @MainActor&lt;/code&gt; repository injected through the SwiftUI environment — no Combine, no view models competing over the same state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;@Observable&lt;/span&gt; &lt;span class="kd"&gt;@MainActor&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;VideoRepository&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;private(set)&lt;/span&gt; &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;hotshiz&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;MediaItem&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;apiClient&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;APIClientProtocol&lt;/span&gt;   &lt;span class="c1"&gt;// protocol-backed for testing&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;ContentView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;videoRepository&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Views just read &lt;code&gt;repository.hotshiz&lt;/code&gt;; updates flow automatically. With Swift 6's strict concurrency on, the compiler kept me honest about every actor hop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that were trickier than expected
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;tvOS focus + a top tab bar.&lt;/strong&gt; Getting a Netflix-style hero carousel to behave with the focus engine took real care. It also made &lt;em&gt;automating&lt;/em&gt; screenshots interesting — scripted remote input doesn't reliably drive the simulator, so I added &lt;code&gt;#if DEBUG&lt;/code&gt; launch-argument hooks to jump straight to any tab/category for a capture script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Face-centered thumbnails.&lt;/strong&gt; Dumpert thumbnails are arbitrary crops, so I run Vision face detection and bias the crop toward detected faces. On a 55" screen the difference is night and day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloudKit delta sync&lt;/strong&gt; with change tokens for watch progress, settings and search history — resume-where-you-left-off works across multiple Apple TVs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Top Shelf&lt;/strong&gt; extension that surfaces trending content on the home screen, sharing data with the app through an App Group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SharePlay&lt;/strong&gt; (&lt;code&gt;GroupActivities&lt;/code&gt;) for synchronized "watch together" playback.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;80+ unit tests with &lt;strong&gt;Swift Testing&lt;/strong&gt;, covering API decoding, the CloudKit merge logic, search/filter state, and autoplay/up-next playlist navigation. Protocols (&lt;code&gt;APIClientProtocol&lt;/code&gt;, &lt;code&gt;CacheServiceProtocol&lt;/code&gt;) make the network and disk layers easy to mock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it / read the source
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source (MIT):&lt;/strong&gt; &lt;a href="https://github.com/rm335/dumpert-apple-tv" rel="noopener noreferrer"&gt;https://github.com/rm335/dumpert-apple-tv&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DOC:&lt;/strong&gt; &lt;a href="https://rm335.github.io/dumpert-apple-tv/" rel="noopener noreferrer"&gt;https://rm335.github.io/dumpert-apple-tv/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free public TestFlight beta:&lt;/strong&gt; &lt;a href="https://testflight.apple.com/join/TXTUMzEq" rel="noopener noreferrer"&gt;https://testflight.apple.com/join/TXTUMzEq&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback and PRs welcome, especially from anyone doing focus-heavy tvOS SwiftUI. The hero-carousel focus work was the fiddliest part, and I'd love to compare notes.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
      <category>appletv</category>
      <category>swiftui</category>
    </item>
  </channel>
</rss>
