<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Get Info: #swift</title>
    <description>Posts tagged “swift” — Blog of independent game and app developer Matt Sephton. Featuring vintage Macintosh, game development, digital artwork, Japanese esoterica, video game reviews, hacks and tips, and much more.</description>
    <link>https://blog.gingerbeardman.com/tag/swift/</link>
    <atom:link href="https://blog.gingerbeardman.com/tag/swift/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 12 Jul 2026 20:54:08 +0000</pubDate>
    <lastBuildDate>Sun, 12 Jul 2026 20:54:08 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>

    
      
        <item>
          <title>Dottie: a native macOS pixel art editor (WIP)</title>
          <description>&lt;p&gt;For the past several months I’ve been working on a pixel art app for macOS, with the goal of making it as much of a first class citizen and great Mac-like experience as possible. To that end it is fully native and built using Swift and SwiftUI, with a tiny bit of AppKit.&lt;/p&gt;

&lt;p&gt;As with all the macOS apps I build, they start with a personal need. This one was to replace the aging and unsupported &lt;a href=&quot;/2023/05/10/piskel-for-playdate/&quot;&gt;Piskel electron/web app&lt;/a&gt;. I like it and I loathe it, so I wondered if I could do better. My friend &lt;a href=&quot;https://jbmorley.co.uk/about/&quot;&gt;Jason Morley&lt;/a&gt; was the additional momentum I needed to actually get moving and try some things out—so thanks Jason!&lt;/p&gt;

&lt;p class=&quot;tofigure&quot;&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/dottie-mushroom-by-maya.png&quot; alt=&quot;IMG&quot; title=&quot;A mushroom drawn by Maya&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;a-little-bit-of-history-repeating&quot;&gt;A little bit of history repeating&lt;/h2&gt;

&lt;p&gt;I’ve been into pixel art since &lt;a href=&quot;/about&quot;&gt;Deluxe Paint ST&lt;/a&gt; (yes, on Atari ST not Commodore Amiga!), and of course on the classic Macintosh. I also collect &lt;a href=&quot;/2023/10/21/list-of-vintage-japanese-pixel-dot-art-software/&quot;&gt;information about the multitude of Japanese “dot art” pixel art apps&lt;/a&gt;, which are quite different to the apps that I grew up with. All this to say that I already had a list of features I missed, pined for, or otherwise thought should make a return. &lt;a href=&quot;/2024/07/14/shibuya-pixel-art-contest-2024/#bonus&quot;&gt;Naturally&lt;/a&gt;, dithering should be a tent pole feature affecting all tools.&lt;/p&gt;

&lt;p&gt;A dither smudge like the one shown below was last seen by me in 1992’s Multi Paint System (PC-98).&lt;/p&gt;

&lt;lite-youtube style=&quot;aspect-ratio: 320/243;&quot; videoid=&quot;XKyDG7aF3xU&quot; params=&quot;start=0&amp;amp;modestbranding=2&quot;&gt;
&lt;/lite-youtube&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;look-mano-dependencies&quot;&gt;Look, Ma—no dependencies!&lt;/h2&gt;

&lt;p&gt;And as an additional constraint—&lt;a href=&quot;/2023/11/21/yoyozo-how-i-made-a-playdate-game-in-39kb/&quot;&gt;which you may know I love to set for myself&lt;/a&gt;—I decided that I would use no packages or external dependencies, just system frameworks. Yes, that means I had to write my own colour picker (but, that’s my idea of a good time!) and some things took longer than just adding a package, but I can say that there is precious little wasted code inside this app. In fact, at the time of writing a single-architecture build of the app that has been readied for distribution still fits on a &lt;a href=&quot;/2025/05/19/media-darling-t-shirt-design/&quot;&gt;3.5” 2HD floppy disk&lt;/a&gt;!&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;pre-mortem&quot;&gt;Pre-mortem&lt;/h2&gt;

&lt;p&gt;A full post-mortem will come after release.&lt;/p&gt;

&lt;p&gt;The trickiest parts of development so far:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;drawing pixelated circles of any width and height (all the classic graphics programming text books require the circle to have odd dimensions so that the coordinate of the centre pixel is an integer)&lt;/li&gt;
  &lt;li&gt;figuring out the intricacies of the document-based application model&lt;/li&gt;
  &lt;li&gt;trying to get the “New Document” button to appear on the file selector that appears at app launch (in fact this one still evades me for reasons I can’t figure out, &lt;a href=&quot;/support&quot;&gt;get in touch if you can help&lt;/a&gt;!)&lt;/li&gt;
  &lt;li&gt;automating help book compilation (&lt;a href=&quot;https://marioaguzman.wordpress.com/2020/09/12/auth/&quot;&gt;thanks Mario&lt;/a&gt;!)&lt;/li&gt;
  &lt;li&gt;performance bottlenecks with some aspects of SwiftUI (thanks &lt;a href=&quot;https://developer.apple.com/wwdc25/labs/overview/&quot;&gt;WWDC Lab&lt;/a&gt;!)&lt;/li&gt;
  &lt;li&gt;surprise performance gains from using AppKit for better gestures&lt;/li&gt;
  &lt;li&gt;selections and marching ants&lt;/li&gt;
  &lt;li&gt;dealing with some bad early decisions (tech debt)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most fun aspects so far:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;designing and iterating on the UI&lt;/li&gt;
  &lt;li&gt;coming up with a name and brand&lt;/li&gt;
  &lt;li&gt;implementing palette management and trying new ideas&lt;/li&gt;
  &lt;li&gt;implementing a custom colour picker, twice&lt;/li&gt;
  &lt;li&gt;drawing the various tool and app icons&lt;/li&gt;
  &lt;li&gt;getting to a point where it feels done and every new feature is icing on the cake&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One interesting thing about the app:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;there is no settings window&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;launching-late-2025&quot;&gt;Launching late-2025&lt;/h2&gt;

&lt;p&gt;I hope to launch the app this autumn, but until then: if you’re a pixel artist feel free to &lt;a href=&quot;/support&quot;&gt;get in touch&lt;/a&gt; with your email address and I’ll send you a TestFlight invite!&lt;/p&gt;
</description>
          <author>by Matt Sephton</author>
          <pubDate>Thu, 28 Aug 2025 10:00:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2025/08/28/dottie-native-macos-pixel-art-editor-wip/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2025/08/28/dottie-native-macos-pixel-art-editor-wip/</guid>
        </item>
      
    
      
        <item>
          <title>Stapler: I remade a 32 year old classic Macintosh app</title>
          <description>&lt;blockquote&gt;
  &lt;p&gt;The latest version of this app is now available as a free download on the Mac App Store.&lt;br /&gt;
More info on my apps website at: &lt;a href=&quot;https://www.gingerbeardman.com/apps/stapler&quot;&gt;gingerbeardman.com/apps/stapler/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A couple of days ago I was &lt;a href=&quot;https://news.ycombinator.com/item?id=41192547&quot;&gt;reading on Hacker News about a feature in some &lt;em&gt;Linux&lt;/em&gt; window managers where they allow collections of tabs from different apps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This reminded me of &lt;em&gt;BeOS&lt;/em&gt;, but at the same time it reminded me of an app from 1992 for classic Macintosh called &lt;a href=&quot;https://macintoshgarden.org/apps/stapler-11&quot;&gt;&lt;em&gt;Stapler&lt;/em&gt;&lt;/a&gt;, and how &lt;a href=&quot;https://twitter.com/gingerbeardman/status/1590051288951443456&quot;&gt;I’d talked about that&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/gingerbeardman/status/1596573654674034691&quot;&gt;it’s one-time spiritual successor&lt;/a&gt;, &lt;a href=&quot;http://hasseg.org/launchList/&quot;&gt;&lt;em&gt;LaunchList&lt;/em&gt;&lt;/a&gt;, in the past. These were both similar apps that allowed you to collect and launch all the apps, files, folders, documents, related to a specific task, thus saving time. Or as Ali Rantakari so succinctly put it in 2009: “&lt;a href=&quot;http://hasseg.org/blog/post/249/launching-lots-of-stuff-at-once-on-your-mac/&quot;&gt;Opening a Bunch of Stuff at Once on Your Mac&lt;/a&gt;”.&lt;/p&gt;

&lt;p&gt;So over the past day or so I built my own take on this concept for modern macOS!&lt;/p&gt;

&lt;p&gt;Whilst my app is inspired by both Stapler (right down to the name) and LaunchList, my app adds improvements and features of its own and is more of a hybrid of both. For example, Stapler didn’t have drag and drop and LaunchList didn’t have zero-click auto-launch. My goal was to keep it as simple as possible, but no simpler. To that end, there are no preferences or settings in the app.&lt;/p&gt;

&lt;hr /&gt;

&lt;p class=&quot;tofigure&quot;&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/stapler.png&quot; alt=&quot;PNG&quot; title=&quot;Stapler, for modern macOS (12.0 or newer)&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;tell-me-more&quot;&gt;Tell me more&lt;/h2&gt;

&lt;p&gt;The idea is you set up a Stapler Document per project containing related apps, files, folders, etc. Then you can open them all at once by launching the single document. Each document contains a list of aliases that can be managed, inspected, launched using the app. The key time-saver is that if you launch a Stapler Document directly, all the items in its list will automatically be launched. Cool!&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Work: text editor, run current game, pixel art editor, bitmap font app, todo list&lt;/li&gt;
  &lt;li&gt;Play: Music app, Hacker News app, Twitter app, script to position windows&lt;/li&gt;
  &lt;li&gt;Movie: run Caffeine to keep your computer on, shortcut to put displays to sleep&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s an odd way of thinking about working on a computer—it’s task-based rather than app-based or document-based. Indeed, some might say it’s an outdated way of approaching things. But I’m always &lt;a href=&quot;https://www.youtube.com/playlist?list=PLfF-zlMNYMd_ZioGb0BKdqwWnx0wCDSgU&quot;&gt;banging the drum&lt;/a&gt; about there being so much good stuff that was prematurely left behind along with the memories of System 7 (&lt;a href=&quot;/2021/04/17/turning-an-ipad-pro-into-the-ultimate-classic-macintosh/&quot;&gt;though I still use that&lt;/a&gt;), BeOS, OS/2, Amiga Workbench, GEM and the many alternative desktops of Atari ST, etc. So I thought I’d see if I could walk the walk as well as talk the talk.&lt;/p&gt;

&lt;h2 id=&quot;details&quot;&gt;Details&lt;/h2&gt;

&lt;p&gt;It’s written in Swift and SwiftUI and weighs in at 640KB, about one third of which is a multitude of icon files at many different sizes and resolutions. By creating a Document-Based App you get a ton of functionality for free, such as document/tab/window management, undo/redo (though I still needed to watch for it and refresh the app window), and much more.&lt;/p&gt;

&lt;p&gt;The editor is a native macOS window that’s kind of like list view in a file manager, or a spreadsheet, or a little folder…depending on your point of view. Plus some menu commands and keyboard equivalents. You can have multiple windows open at once, for example one window each for all your common tasks, giving you the ability to launch full tasks or parts of them with minimal effort.&lt;/p&gt;

&lt;p&gt;The items in each list are macOS &lt;a href=&quot;https://eclecticlight.co/2020/05/21/bookmarks-a-type-of-alias-their-access-and-use/&quot;&gt;bookmarks&lt;/a&gt; (sometimes: security scoped bookmarks) which are a type of authorised/verified/secure alias (in fact, they’re still called aliases in the code) that have been around for about 10–15 years. They contain the path plus a bunch more info. As macOS becomes more locked-down the recommended way of accessing files is to retrieve these bookmarks through the normal layers of system permissions and security. Without the bookmarks, for example just using plain text paths, I would not be able to show the full images in Quick Look or easily launch the list items. A key benefit is that the bookmark will still resolve if the file is moved somewhere else on the same disk, or even to a different volume!&lt;/p&gt;

&lt;p&gt;I store the items as JSON in the saved file, simply because I prefer it to XML (which is the main/default option). I wanted the files to still be human readable and editable to a degree.&lt;/p&gt;

&lt;p&gt;The files are launched using the default app specified by that file, so it can be changed on a per-file basis. Individual images might open in an image editor, image viewer, app to run OCR, script to run OCR on it, etc.&lt;/p&gt;

&lt;p&gt;Dealing with files was both cool and annoying, cool that you can get the bookmarks to files so easily, but annoying that you have to jump through so many hoops to work around the security and sandbox protections and end up having to do file requests in a long-winded way, and then there’s having to tweak plist entries to give the app just the right permissions. I’m using some features of SwiftUI that mean the app can’t run on anything before macOS 14 Sonoma. All-in-all I’d say modern macOS development is a bit of a mixed bag. Take it or leave it.&lt;/p&gt;

&lt;h2 id=&quot;bonus-tip&quot;&gt;Bonus tip&lt;/h2&gt;

&lt;p&gt;Make sure to &lt;em&gt;uncheck&lt;/em&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;System Settings&lt;/code&gt; &amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Desktop &amp;amp; Dock&lt;/code&gt; &amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Windows&lt;/code&gt; &amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Close windows when quitting an application&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then leave the windows of an app open as you quit it. When you next launch the app its windows will restore to their previous size and position. If you close the windows first, then the app will restore to having no windows open.&lt;/p&gt;

&lt;hr /&gt;

&lt;blockquote&gt;
  &lt;h2 id=&quot;thanks&quot;&gt;Thanks&lt;/h2&gt;

  &lt;p&gt;My good friend Dave Roberts (Serendipity App Company) for brainstorming why it was so damned difficult to get the app to react differently when a document was opened from Finder. Rip it up and start again! To Dustin Mierau for kickstarting this trend of remaking forgotten old apps for modern macOS. And eternal thanks to &lt;a href=&quot;https://twitter.com/chrispatterson/status/1822396663425532259&quot;&gt;Chris Patterson&lt;/a&gt; and Ali Rantakari for their apps.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;since-launch&quot;&gt;Since launch&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;support added for macOS 12 and newer (was originally macOS 14 and newer)&lt;/li&gt;
  &lt;li&gt;new features added&lt;/li&gt;
  &lt;li&gt;omissions addressed&lt;/li&gt;
  &lt;li&gt;bug fixes&lt;/li&gt;
  &lt;li&gt;new icon on the way&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;elsewhere&quot;&gt;Elsewhere&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://news.ycombinator.com/item?id=41212193&quot;&gt;Hacker News&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://tidbits.com/2024/09/02/appbits-stapler-opens-multiple-apps-documents-and-folders/&quot;&gt;TidBits&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
          <author>by Matt Sephton</author>
          <pubDate>Sat, 10 Aug 2024 21:00:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2024/08/10/stapler-i-remade-a-32-year-old-classic-macintosh-app/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2024/08/10/stapler-i-remade-a-32-year-old-classic-macintosh-app/</guid>
        </item>
      
    

  </channel>
</rss>
