<?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: jiahui liang</title>
    <description>The latest articles on DEV Community by jiahui liang (@jiahui_liang_93e0c295173b).</description>
    <link>https://dev.to/jiahui_liang_93e0c295173b</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4268968%2F80105482-2e68-4198-b4f0-ba26443ec1df.png</url>
      <title>DEV Community: jiahui liang</title>
      <link>https://dev.to/jiahui_liang_93e0c295173b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jiahui_liang_93e0c295173b"/>
    <language>en</language>
    <item>
      <title>Why I Built a 6 MB Native Swift Screenshot &amp; Offline OCR App for macOS (Instead of Electron)</title>
      <dc:creator>jiahui liang</dc:creator>
      <pubDate>Fri, 27 Nov 2026 12:43:23 +0000</pubDate>
      <link>https://dev.to/jiahui_liang_93e0c295173b/why-i-built-a-6-mb-native-swift-screenshot-offline-ocr-app-for-macos-instead-of-electron-41ab</link>
      <guid>https://dev.to/jiahui_liang_93e0c295173b/why-i-built-a-6-mb-native-swift-screenshot-offline-ocr-app-for-macos-instead-of-electron-41ab</guid>
      <description>&lt;p&gt;Like a lot of developers who moved from Windows to macOS, I missed one tiny daily habit: capturing a region of my screen and pinning it floating above my IDE or PDF reader.&lt;/p&gt;

&lt;p&gt;Existing Mac tools each solved part of the puzzle, but never quite the combination I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in macOS (&lt;code&gt;Cmd+Shift+4&lt;/code&gt;) is fast, but has no floating desktop pins and no one-click OCR from the selection bar.&lt;/li&gt;
&lt;li&gt;Snipaste is great for pinning, but its Mac build isn't native Swift/AppKit and offline OCR sits behind a paid upgrade.&lt;/li&gt;
&lt;li&gt;CleanShot X is an incredible all-in-one suite for video recording and cloud sharing, but overkill if you only want fast static screenshots, markup, pins, and local text extraction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://stillpin.com" rel="noopener noreferrer"&gt;Stillpin&lt;/a&gt;&lt;/strong&gt;—a lightweight (~6–7 MB) native Swift &amp;amp; AppKit menu bar utility for macOS 14+.&lt;/p&gt;

&lt;p&gt;Here are three engineering lessons from building a native macOS capture utility that surprised me along the way.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Apple Vision Makes High-Quality Offline OCR Free on macOS
&lt;/h3&gt;

&lt;p&gt;You don't need a cloud API or a heavy bundled ML runtime to extract clean text from screenshots on macOS. Apple's &lt;code&gt;VNRecognizeTextRequest&lt;/code&gt; (Vision framework) runs fast, accurately, and 100% locally on Apple Silicon and Intel Macs.&lt;/p&gt;

&lt;p&gt;Because local OCR costs $0 in cloud inference, I kept &lt;strong&gt;all local tools permanently free with no account wall&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Region capture &amp;amp; markup (arrows, shapes, highlighter, text, mosaic redaction)&lt;/li&gt;
&lt;li&gt;Floating desktop image pins (&lt;code&gt;Cmd+T&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Offline Apple Vision OCR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you just want to copy text from a terminal video, slide deck, or scanned PDF without uploading anything, on-device Vision handles it cleanly. (I wrote a quick walkthrough on &lt;a href="https://stillpin.com/guides/copy-text-from-images-mac/" rel="noopener noreferrer"&gt;copying text from images and screenshots on Mac&lt;/a&gt; comparing Preview Live Text vs. region OCR.)&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Why In-Place AI Matters More Than Another Chat Tab
&lt;/h3&gt;

&lt;p&gt;When reading dense research papers, foreign-language documentation, or cryptic compiler stack traces, copy-pasting into a browser chat tab breaks context—especially for math formulas, subscripts, charts, and visual layouts.&lt;/p&gt;

&lt;p&gt;In Stillpin, pressing &lt;code&gt;Cmd+Shift+A&lt;/code&gt; lets you drag a rectangle around a formula, diagram, or error log and open a native follow-up conversation right beside your IDE or PDF—and pin the answer card on your desktop while you keep reading or debugging.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpeo3jetgwq5ekb0ppzl8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpeo3jetgwq5ekb0ppzl8.webp" alt="Stillpin native AI conversation workflow on macOS" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Privacy was a hard boundary here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regular capture, annotation, pinning, and local OCR never touch the network.&lt;/li&gt;
&lt;li&gt;Cloud AI only runs when you explicitly trigger Translate or AI after an in-app consent prompt, and only sends the cropped region you selected.&lt;/li&gt;
&lt;li&gt;Saved conversation history stays locally on your Mac so you can search or delete it anytime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. macOS Screen Recording (TCC) &amp;amp; Sandbox Quirks Are Brutal
&lt;/h3&gt;

&lt;p&gt;If you ever build a macOS screenshot app, watch out for two real-world traps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Code signature changes invalidate Screen Recording grants silently&lt;/strong&gt;: Switching between Developer ID and Mac App Store builds with the same bundle ID can leave a stale TCC entry where the toggle looks ON in System Settings, yet &lt;code&gt;CGPreflightScreenCaptureAccess()&lt;/code&gt; keeps returning &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global hotkeys vs. system conflicts&lt;/strong&gt;: Always let users remap &lt;code&gt;Cmd+Shift+S&lt;/code&gt; / &lt;code&gt;Cmd+Shift+A&lt;/code&gt; cleanly and document how to check &lt;code&gt;System Settings → Keyboard → Keyboard Shortcuts → Screenshots&lt;/code&gt; (here is my full &lt;a href="https://stillpin.com/guides/mac-screenshot-shortcuts-guide/" rel="noopener noreferrer"&gt;Mac screenshot shortcuts &amp;amp; troubleshooting cheat sheet&lt;/a&gt;).&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Try It (Core Tools Free Forever)
&lt;/h3&gt;

&lt;p&gt;If you're looking for a &lt;a href="https://stillpin.com/guides/snipaste-alternative-mac/" rel="noopener noreferrer"&gt;native Snipaste alternative on Mac&lt;/a&gt; or a &lt;a href="https://stillpin.com/guides/cleanshot-x-alternative-mac/" rel="noopener noreferrer"&gt;lightweight free alternative to CleanShot X&lt;/a&gt; for everyday static captures, you can grab the direct macOS 14+ DMG at &lt;strong&gt;&lt;a href="https://stillpin.com" rel="noopener noreferrer"&gt;stillpin.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Capture, markup, floating pins, and local OCR are &lt;strong&gt;free forever&lt;/strong&gt; (no account required).&lt;/li&gt;
&lt;li&gt;Includes &lt;strong&gt;5 free AI explanation / translation tries&lt;/strong&gt; per Mac with no sign-up so you can test it on your own code or PDFs first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy to answer any Swift / AppKit / Vision framework questions in the comments!&lt;/p&gt;

</description>
      <category>swift</category>
      <category>productivity</category>
      <category>indiedev</category>
      <category>macos</category>
    </item>
  </channel>
</rss>
