<?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: Zane — 個人開発メモ</title>
    <description>The latest articles on DEV Community by Zane — 個人開発メモ (@dayu510).</description>
    <link>https://dev.to/dayu510</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%2F4244744%2Fd01ea8b6-90dc-4fc6-9941-422147da9ca1.jpg</url>
      <title>DEV Community: Zane — 個人開発メモ</title>
      <link>https://dev.to/dayu510</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dayu510"/>
    <language>en</language>
    <item>
      <title>Two macOS verification failures: Gatekeeper cannot-verify and brew doctor CLT warnings</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Wed, 25 Nov 2026 01:28:12 +0000</pubDate>
      <link>https://dev.to/dayu510/two-macos-verification-failures-gatekeeper-cannot-verify-and-brew-doctor-clt-warnings-5a70</link>
      <guid>https://dev.to/dayu510/two-macos-verification-failures-gatekeeper-cannot-verify-and-brew-doctor-clt-warnings-5a70</guid>
      <description>&lt;p&gt;Two unrelated-looking errors on macOS come from the same shape: the thing exists, but the verification path is broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gatekeeper: "cannot verify the developer"
&lt;/h2&gt;

&lt;p&gt;Split the failure into three layers before you retry anything.&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
xattr -l /Applications/SomeApp.app          # com.apple.quarantine present?&lt;br&gt;
codesign -dv --verbose=4 /Applications/SomeApp.app   # signed at all?&lt;br&gt;
spctl -a -vv /Applications/SomeApp.app      # accepted / rejected, and why&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;quarantine attribute present → download origin. Right-click → Open once, or remove the attribute deliberately.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;code object is not signed at all&lt;/code&gt; → unsigned. Follow the vendor's instructions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;spctl&lt;/code&gt; rejected with &lt;code&gt;no usable signature&lt;/code&gt; → signed but not notarized.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Retrying "right-click → Open" without reading which layer failed is how people conclude "macOS is broken".&lt;/p&gt;

&lt;h2&gt;
  
  
  Homebrew: &lt;code&gt;brew doctor&lt;/code&gt; CLT warnings
&lt;/h2&gt;

&lt;p&gt;The warning is usually not "Command Line Tools missing" but "pointing at the wrong place".&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
xcode-select -p&lt;br&gt;
xcodebuild -version 2&amp;gt;&amp;amp;1 | head -3&lt;br&gt;
file "$(which brew)"&lt;br&gt;
brew config | grep HOMEBREW_PREFIX&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;xcode-select -p&lt;/code&gt; returning the CLT path while full Xcode is installed produces linker and SDK errors that look like project problems.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;file&lt;/code&gt; reporting &lt;code&gt;x86_64&lt;/code&gt; means an Intel Homebrew; on Apple Silicon that binary may not run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The durable fix is aligning on the arm64 prefix, not reinstalling Rosetta — restoring emulation keeps the old binaries alive and the mismatch with them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Order that saves time
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Align &lt;code&gt;xcode-select -p&lt;/code&gt; and &lt;code&gt;HOMEBREW_PREFIX&lt;/code&gt; first — toolchain ground truth.&lt;/li&gt;
&lt;li&gt;Re-run &lt;code&gt;brew doctor&lt;/code&gt; and compare the &lt;em&gt;class&lt;/em&gt; of warnings, not the count.&lt;/li&gt;
&lt;li&gt;Then Gatekeeper: &lt;code&gt;xattr&lt;/code&gt; → &lt;code&gt;codesign&lt;/code&gt; → &lt;code&gt;spctl&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What this does not fix
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Notarization failures that require the vendor to re-sign&lt;/li&gt;
&lt;li&gt;Rosetta-only proprietary agents (VPN/AV) — vendor updates needed&lt;/li&gt;
&lt;li&gt;Errors caused by a stale toolchain cache after a major OS upgrade&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;Gatekeeper "cannot verify the developer", direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/macos-plugin-developer-cannot-verify/?utm_source=devto" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/macos-plugin-developer-cannot-verify/?utm_source=devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Homebrew / CLT warnings, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/homebrew-brew-doctor-clt-warning/?utm_source=devto" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/homebrew-brew-doctor-clt-warning/?utm_source=devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>cli</category>
      <category>software</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Docker Desktop and Homebrew both fail after a macOS upgrade: a two-track triage</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Mon, 23 Nov 2026 18:13:39 +0000</pubDate>
      <link>https://dev.to/dayu510/docker-desktop-and-homebrew-both-fail-after-a-macos-upgrade-a-two-track-triage-530</link>
      <guid>https://dev.to/dayu510/docker-desktop-and-homebrew-both-fail-after-a-macos-upgrade-a-two-track-triage-530</guid>
      <description>&lt;p&gt;macOS upgrades break local toolchains in two different places: the container runtime (Docker Desktop) and the package manager (Homebrew / Command Line Tools). They fail with unrelated messages, and people usually fix the wrong one first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Track 1: Docker Desktop starts but containers misbehave
&lt;/h2&gt;

&lt;p&gt;Three checks in this order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;a) Is the VM healthy, not just the app?&lt;/strong&gt; Docker Desktop runs a Linux VM. A "Docker is running" icon does not mean the VM has disk space or working file sharing.&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
docker info | head -30          # look at Server Version, Storage Driver, Disk space&lt;br&gt;
docker run --rm alpine df -h /  # inside the VM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b) File sharing and iCloud.&lt;/strong&gt; If your project lives under a synced folder (Desktop/Documents with "Optimize Mac Storage"), the file may be evicted to the cloud. Inside the container that surfaces as I/O errors on bind mounts, not as a Docker error. Move the project outside the synced paths and re-run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c) Architecture drift.&lt;/strong&gt; On Apple Silicon, a &lt;code&gt;linux/amd64&lt;/code&gt; image runs under emulation. It works until something times out.&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
docker image inspect &lt;a href="" class="article-body-image-wrapper"&gt;&lt;img&gt;&lt;/a&gt; --format '{{.Architecture}}'&lt;/p&gt;

&lt;h2&gt;
  
  
  Track 2: Homebrew breaks with "Bad CPU type" or CLT errors
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;a) Confirm what the binary actually is.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
file "$(which brew)"&lt;br&gt;
lipo -info /opt/homebrew/bin/brew 2&amp;gt;/dev/null&lt;/p&gt;

&lt;p&gt;&lt;code&gt;x86_64&lt;/code&gt; means an Intel Homebrew under &lt;code&gt;/usr/local&lt;/code&gt; — after a Rosetta removal it cannot run. The fix is to use the arm64 prefix (&lt;code&gt;/opt/homebrew&lt;/code&gt;) rather than forcing Rosetta back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;b) Command Line Tools vs full Xcode.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
xcode-select -p&lt;br&gt;
xcodebuild -version 2&amp;gt;&amp;amp;1 | head -3&lt;/p&gt;

&lt;p&gt;&lt;code&gt;xcode-select -p&lt;/code&gt; pointing at &lt;code&gt;/Library/Developer/CommandLineTools&lt;/code&gt; while a full Xcode is installed produces linker and SDK-not-found errors that look like project problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c) Reinstall CLT only when the receipt is broken.&lt;/strong&gt; &lt;code&gt;softwareupdate --list&lt;/code&gt; shows available CLT updates; a corrupted receipt usually shows as "already installed" with a missing toolchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not fix
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rosetta-dependent proprietary binaries (some VPN/AV agents) — those need vendor updates&lt;/li&gt;
&lt;li&gt;Disk-full conditions inside the Docker VM (that is Track 1a, not a Homebrew problem)&lt;/li&gt;
&lt;li&gt;Mismatched Node/Python versions pulled in by package managers — separate class&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;CI and build-failure triage flow, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/github-actions-ci-debugger/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=docker_homebrew_1124" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/github-actions-ci-debugger/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=docker_homebrew_1124&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;发布顺序建议（17 波）&lt;/strong&gt;：先 B1/B2（刚起量的 R30/R31 顺风）→ 再 Dev.to 长文 → 最后 B3（R29 已 195 播，作收尾）。&lt;/p&gt;




&lt;h2&gt;
  
  
  三、明日待办校验清单
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] 三条 Bluesky 发送前：&lt;code&gt;goto https://bsky.app/&lt;/code&gt; 重载 → 逐条 compose → &lt;strong&gt;发后回读 facets = 3&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Dev.to 发布前：确认焦点在 &lt;code&gt;#tag-input&lt;/code&gt; 再打标签（防 slug 污染）&lt;/li&gt;
&lt;li&gt;[ ] 全部内容禁令词扫描 = 0（价格 / 速度数字 / 完全系）&lt;/li&gt;
&lt;li&gt;[ ] 结束后 &lt;code&gt;osascript quit&lt;/code&gt; + &lt;code&gt;pkill -f "ego lite"&lt;/code&gt;，核 &lt;code&gt;pgrep -fi "ego lite|ego Helper|ego-browser" | wc -l&lt;/code&gt; = 0&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Triage path for the Next.js hydration mismatch on macOS Safari and Chrome</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Mon, 23 Nov 2026 02:12:31 +0000</pubDate>
      <link>https://dev.to/dayu510/triage-path-for-the-nextjs-hydration-mismatch-on-macos-safari-and-chrome-26mk</link>
      <guid>https://dev.to/dayu510/triage-path-for-the-nextjs-hydration-mismatch-on-macos-safari-and-chrome-26mk</guid>
      <description>&lt;p&gt;"Hydration failed because the server rendered HTML didn't match the client" is not one bug. On macOS it splits into three causes that produce the same red overlay in Safari and Chrome, and the fix for each is different. This is the triage I use before touching any component.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Read the diff, not the message
&lt;/h2&gt;

&lt;p&gt;The overlay prints both trees. In Chrome DevTools the warning includes the offending element and the two HTML fragments; in Safari the console shows the mismatch but collapses it. Use Chrome once for the diagnosis even if you ship on Safari.&lt;/p&gt;

&lt;p&gt;If the diff shows &lt;strong&gt;text content differing&lt;/strong&gt;, it is almost always data: a timestamp, &lt;code&gt;Math.random()&lt;/code&gt;, &lt;code&gt;Date.now()&lt;/code&gt;, or a locale-dependent format.&lt;/p&gt;

&lt;p&gt;If the diff shows &lt;strong&gt;extra/missing attributes&lt;/strong&gt;, it is an extension mutating the DOM (Grammarly, translation extensions, dark-mode tools) — see §3.&lt;/p&gt;

&lt;p&gt;If the diff is a &lt;strong&gt;different element order in a list&lt;/strong&gt;, it is a key problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The four causes, in frequency order
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;a) Time and randomness in render.&lt;/strong&gt;&lt;br&gt;
Any value computed during render that differs between server and client will mismatch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// wrong&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&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;span class="nf"&gt;toLocaleTimeString&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;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;// right: render a stable value, update after mount&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setT&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;useEffect&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;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&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;span class="nf"&gt;toLocaleTimeString&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;span class="p"&gt;,&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;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;span&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;t&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s2"&gt;"--:--"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;b) Browser-only APIs during render.&lt;/strong&gt; &lt;code&gt;window&lt;/code&gt;, &lt;code&gt;localStorage&lt;/code&gt;, &lt;code&gt;navigator.language&lt;/code&gt;, and &lt;code&gt;Intl&lt;/code&gt; with different default locales all diverge. Guard with a mount effect, or use &lt;code&gt;next/dynamic&lt;/code&gt; with &lt;code&gt;ssr: false&lt;/code&gt; for the subtree.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;c) Invalid nesting.&lt;/strong&gt; &lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;div/&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;a&amp;gt;&amp;lt;a/&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt; is parsed differently by the browser than React expects. The server output is repaired by the HTML parser before React hydrates it, so the trees never match. This is the cause most often misdiagnosed as "a Next bug".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;d) Extension-injected DOM.&lt;/strong&gt; Translators and password managers insert nodes into the body. Nothing is wrong with your app. Verify by testing in a clean profile with extensions disabled before you refactor anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Confirm the cause, don't guess
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# server HTML vs client HTML for the same route&lt;/span&gt;
curl -s http://localhost:3000/page &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; server.html
npx playwright open http://localhost:3000/page   &lt;span class="c"&gt;# then save DOM as client.html&lt;/span&gt;
diff &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;tidy -q -i server.html&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;tidy -q -i client.html&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -40
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the diff is empty but the console still complains, the mutation happens &lt;em&gt;after&lt;/em&gt; load — look for extensions or third-party scripts that write to the DOM.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Fixing without hiding
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;suppressHydrationWarning&lt;/code&gt; is legitimate for a single timestamp element. Using it on a wrapper to silence an entire tree is how real mismatches get buried.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useEffect&lt;/code&gt;-only rendering costs one frame of empty state. Keep the placeholder the same size to avoid layout shift.&lt;/li&gt;
&lt;li&gt;For genuinely client-only widgets, wrap once at the boundary (&lt;code&gt;ssr: false&lt;/code&gt;) instead of sprinkling &lt;code&gt;typeof window&lt;/code&gt; checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. What this does not fix
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mismatches caused by cached HTML from a previous deploy (check &lt;code&gt;Cache-Control&lt;/code&gt; and CDN purge)&lt;/li&gt;
&lt;li&gt;Streaming/Suspense boundary misordering — different failure, different fix&lt;/li&gt;
&lt;li&gt;Errors that only appear on second navigation (usually state leaking through a module-level variable)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;Next.js hydration error flow, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/nextjs-hydration-error-fix/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=nextjs_1123" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/nextjs-hydration-error-fix/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=nextjs_1123&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Debugging a failing GitHub Actions run from the failure itself</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:57:14 +0000</pubDate>
      <link>https://dev.to/dayu510/debugging-a-failing-github-actions-run-from-the-failure-itself-4okn</link>
      <guid>https://dev.to/dayu510/debugging-a-failing-github-actions-run-from-the-failure-itself-4okn</guid>
      <description>&lt;h1&gt;
  
  
  Debugging a failing GitHub Actions run from the failure itself
&lt;/h1&gt;

&lt;p&gt;Most CI failures are read wrong. The red step name you see in the PR is usually the &lt;em&gt;last&lt;/em&gt; thing that broke, not the cause. This is a short triage path for GitHub-hosted runners that gets you to the first real error instead of the loudest one.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Jump to the first failing step, not the failing job
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh run list --limit 5
gh run view &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;run-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --log-failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--log-failed&lt;/code&gt; prints only the failed steps, which strips 90% of the noise. If you do not have &lt;code&gt;gh&lt;/code&gt; installed, the same information is in the web UI under the failed step's log, but &lt;code&gt;--log-failed&lt;/code&gt; is faster because it does not interleave passing steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Classify before you read
&lt;/h2&gt;

&lt;p&gt;Four shapes cover almost everything:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shape&lt;/th&gt;
&lt;th&gt;Typical line&lt;/th&gt;
&lt;th&gt;Real cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Missing tool&lt;/td&gt;
&lt;td&gt;&lt;code&gt;command not found: xcodebuild&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;runner image changed, or the tool lives in a path the step does not see&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Permission&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Permission denied (publickey)&lt;/code&gt; / &lt;code&gt;403&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;token scope or key not mounted in &lt;em&gt;this&lt;/em&gt; step&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment leak&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Cannot find module&lt;/code&gt; only in CI&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;node_modules&lt;/code&gt; built on a different platform or a lockfile drift&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Timeout&lt;/td&gt;
&lt;td&gt;step killed at N minutes&lt;/td&gt;
&lt;td&gt;real work exceeds the limit — check whether caching silently stopped working&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The shape decides where you look. A &lt;code&gt;command not found&lt;/code&gt; is never a code problem; a &lt;code&gt;Cannot find module&lt;/code&gt; on a &lt;code&gt;npm ci&lt;/code&gt; step is almost always lockfile or platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Confirm the runner image is what you think
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="s"&gt;sw_vers&lt;/span&gt;
    &lt;span class="s"&gt;uname -m&lt;/span&gt;
    &lt;span class="s"&gt;which xcodebuild || true&lt;/span&gt;
    &lt;span class="s"&gt;echo "${PATH}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;macos-latest&lt;/code&gt; moves. If a workflow started failing on a date with no code change, print the image version in the failing step and compare to the last green run. This single check explains a large share of "it broke overnight" reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Reproduce locally with the same toolchain
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;act&lt;/code&gt; runs workflows in Docker, which is useful for Linux jobs and useless for macOS ones. For macOS, the honest move is to reproduce the &lt;em&gt;step command&lt;/em&gt; in a local shell with the same env:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# take the exact env block from the job, then run the failing command&lt;/span&gt;
env -i &lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$PATH"&lt;/span&gt; &lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME"&lt;/span&gt; bash -lc &lt;span class="s1"&gt;'&amp;lt;failing command&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it passes under &lt;code&gt;env -i&lt;/code&gt; but fails in CI, the difference is the environment, not the code. That is a much smaller search space.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Only then touch the workflow
&lt;/h2&gt;

&lt;p&gt;The temptation is to add &lt;code&gt;set -x&lt;/code&gt;, &lt;code&gt;continue-on-error&lt;/code&gt;, or a &lt;code&gt;retry&lt;/code&gt; wrapper. Do that &lt;em&gt;after&lt;/em&gt; you know the shape. &lt;code&gt;continue-on-error&lt;/code&gt; on a failing step converts a hard failure into a silent one and is the most common way a CI suite stops being trustworthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not fix
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Flaky tests that fail on timing — those need quarantine, not retries&lt;/li&gt;
&lt;li&gt;Secrets that exist in the repo settings but not in fork PRs (by design)&lt;/li&gt;
&lt;li&gt;Cache poisoning: if a cached artifact is wrong, a clean run is the only honest baseline&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reading the log without leaving the terminal
&lt;/h2&gt;

&lt;p&gt;One practical annoyance: the failure text is long, wrapped, and full of ANSI colour codes that make selecting the &lt;em&gt;useful&lt;/em&gt; lines awkward. Stripping them first is worth the one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh run view &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;run-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --log-failed &lt;span class="o"&gt;|&lt;/span&gt; sed -r &lt;span class="s1"&gt;'s/\x1B\[[0-9;]*[mK]//g'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; less -R
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you prefer to read what is already on screen (browser log view, local terminal), selecting the region and reading it in place — rather than copying wrapped text into a translator — keeps the indentation that tells you which stack frames belong together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;CI debugging flow, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/github-actions-ci-debugger/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ci_wave13" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/github-actions-ci-debugger/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ci_wave13&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unlocalised Steam games on a Mac: engine launch errors vs unreadable text</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sun, 22 Nov 2026 03:15:35 +0000</pubDate>
      <link>https://dev.to/dayu510/unlocalised-steam-games-on-a-mac-engine-launch-errors-vs-unreadable-text-1ihk</link>
      <guid>https://dev.to/dayu510/unlocalised-steam-games-on-a-mac-engine-launch-errors-vs-unreadable-text-1ihk</guid>
      <description>&lt;p&gt;Playing unlocalised games on a Mac fails in two different places, and they get conflated: the &lt;strong&gt;game&lt;/strong&gt; fails to start (engine/build problem), or the game starts and you cannot read it (localisation problem). This post separates the two, with the concrete errors you actually see, and a workflow for the second case that does not break fullscreen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 1: the game does not launch
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unity IL2CPP build fails or the player crashes on start.&lt;/strong&gt; The IL2CPP backend generates C++ and compiles it; failures surface far from your C# code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;il2cpp.exe&lt;/code&gt; errors during build: usually a missing or mismatched Burst/IL2CPP package for the editor version. Build the same project with Mono to confirm the code is fine and the problem is the backend.&lt;/li&gt;
&lt;li&gt;Player crashes immediately after launch with a &lt;code&gt;Data folder not found&lt;/code&gt; or "Unable to load player data": the build output was moved without its &lt;code&gt;&amp;lt;GameName&amp;gt;_Data&lt;/code&gt; directory, or two builds were merged.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DllNotFoundException&lt;/code&gt; at runtime: a native plugin was built for the wrong architecture. On Apple Silicon check the binary with &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;lipo -info&lt;/code&gt;; &lt;code&gt;x86_64&lt;/code&gt;-only plugins need Rosetta or a universal rebuild.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Steam launch fails with a bare error dialog.&lt;/strong&gt; Three checks, in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Steam's own log tells you more than the dialog: &lt;code&gt;~/Library/Application Support/Steam/logs/content_log.txt&lt;/code&gt; and &lt;code&gt;bootstrap_log.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Launch options can break a game silently. A stray &lt;code&gt;%command%&lt;/code&gt; fragment, a quoting mistake, or a leftover &lt;code&gt;-dx11&lt;/code&gt; flag from a different machine is enough. Clear the field entirely, then re-add one flag at a time.&lt;/li&gt;
&lt;li&gt;Verify integrity (&lt;code&gt;Properties → Installed Files → Verify integrity&lt;/code&gt;) &lt;em&gt;after&lt;/em&gt; clearing launch options, not before — otherwise you re-download 20 GB to test a typo.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these need a translator. They need the log path and one variable changed at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 2: the game runs, but you cannot read it
&lt;/h2&gt;

&lt;p&gt;This is the more common complaint, and the usual fixes are all expensive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Phone camera OCR&lt;/strong&gt; — one hand off the keyboard, autofocus hunting across a dark UI, and decorative serif fonts with drop shadows defeat most phone OCR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;⌘Tab&lt;/code&gt; to a browser translator&lt;/strong&gt; — fullscreen state is lost, some engines only render dialogue while focused, and the line you wanted is gone when you come back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy-paste&lt;/strong&gt; — most game UIs are rendered to a surface with no text layer. &lt;code&gt;⌘C&lt;/code&gt; returns nothing. Same class of problem as a canvas-drawn Electron pane.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The constraint that matters is &lt;em&gt;do not take focus from the game&lt;/em&gt;. That leads to a specific design: capture only a rectangle the player draws, recognise it locally, and show the result in a panel that does not activate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌃S → drag a rectangle over the dialogue
    → CGImage in memory
    → VNRecognizeTextRequest (on-device)
    → text → translation
    → floating panel, game keeps focus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Settings that matter for game text:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;usesLanguageCorrection = false&lt;/code&gt; — item names and invented nouns are not dictionary words; correction rewrites them.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minimumTextHeight&lt;/code&gt; explicit — stylised display fonts have small x-height and get dropped under the default threshold.&lt;/li&gt;
&lt;li&gt;Order &lt;code&gt;recognitionLanguages&lt;/code&gt; by what you actually read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practical notes from use: select the dialogue box rather than the whole frame (HUD markers add noise), avoid selecting over animated particle backgrounds, and skip title art — decorative logos are where OCR fails first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hand-written or heavily stylised display faces can fail&lt;/li&gt;
&lt;li&gt;Low-contrast subtitles over bright scenes are unreliable&lt;/li&gt;
&lt;li&gt;Text smaller than roughly 10px on a 1440p frame, unless you crop tighter&lt;/li&gt;
&lt;li&gt;Rotated or perspective-skewed UI text&lt;/li&gt;
&lt;li&gt;Anything that is not text: icons, minimaps, damage numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also: recognition is local, translation is a network call. Offline you get OCR and no translation — often still enough to get unstuck on a quest log.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;16:9 walkthrough (Ep4, Steam English UI):&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=2-t-IE345pI" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=2-t-IE345pI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Screen-OCR flow, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/mac-screenshot-ocr-screen-translate/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=steam_unity_v2" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/mac-screenshot-ocr-screen-translate/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=steam_unity_v2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
    </item>
    <item>
      <title>Triage flow for Xcode 16 and Swift 6 concurrency errors without leaving the IDE</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sun, 22 Nov 2026 02:59:00 +0000</pubDate>
      <link>https://dev.to/dayu510/triage-flow-for-xcode-16-and-swift-6-concurrency-errors-without-leaving-the-ide-4m0d</link>
      <guid>https://dev.to/dayu510/triage-flow-for-xcode-16-and-swift-6-concurrency-errors-without-leaving-the-ide-4m0d</guid>
      <description>&lt;p&gt;Swift 6 concurrency errors are the most expensive English text a macOS developer reads. A single &lt;code&gt;MainActor&lt;/code&gt; isolation mistake can produce a wall of text spanning twenty lines, each a separate diagnostic with its own file and line reference. You copy it, lose a few lines to the wrapping, and now your clipboard holds an error message instead of the fragment you were about to paste.&lt;/p&gt;

&lt;p&gt;This is a triage flow for Xcode 16 / Swift 6 diagnostics that keeps you inside the IDE: read the &lt;strong&gt;root&lt;/strong&gt; diagnostic first, work out which concurrency shape it is, then fix code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four shapes behind most walls of text
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Isolation violation&lt;/strong&gt; — &lt;code&gt;mutation of captured var 'x' in concurrently-executing code&lt;/code&gt;. A captured value is mutated across actor boundaries; the note underneath names the isolation the closure requires.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sendable conformance&lt;/strong&gt; — &lt;code&gt;type 'Foo' does not conform to the 'Sendable' protocol&lt;/code&gt;. Something crosses an isolation domain while holding non-Sendable state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global actor mismatch&lt;/strong&gt; — &lt;code&gt;main actor-isolated property 'y' can not be referenced from a nonisolated context&lt;/code&gt;. Typically a &lt;code&gt;@MainActor&lt;/code&gt; type touched from a background task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async misuse&lt;/strong&gt; — &lt;code&gt;'async' call in a function that does not support concurrency&lt;/code&gt;. The call site needs an async context, not a semaphore.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each shape wants a different fix. Reading the first error tells you which shape you are in; reading the twentieth tells you nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Triage checklist
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Open the issue navigator (&lt;code&gt;⌘5&lt;/code&gt;), not the code.&lt;/strong&gt;&lt;br&gt;
It groups by file and orders by build phase. The first error in the first file is almost always the root; the rest is cascade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Read the error line &lt;em&gt;and&lt;/em&gt; its indented notes.&lt;/strong&gt;&lt;br&gt;
In Swift 6 the note carries the real information: &lt;code&gt;note: capture of 'state' by closure requires explicit isolation&lt;/code&gt;, &lt;code&gt;note: consider making 'Foo' conform to 'Sendable'&lt;/code&gt;, &lt;code&gt;note: annotate with '@MainActor'&lt;/code&gt;. The error names the symptom; the note names the fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Classify before you fix.&lt;/strong&gt;&lt;br&gt;
One question: is this about &lt;em&gt;where&lt;/em&gt; the code runs (isolation) or &lt;em&gt;what&lt;/em&gt; it carries (Sendable)? Isolation fixes are annotations — &lt;code&gt;@MainActor&lt;/code&gt;, &lt;code&gt;nonisolated&lt;/code&gt;, &lt;code&gt;sending&lt;/code&gt;. Sendable fixes are type surgery: value semantics, immutable stored properties, or moving the type inside the actor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Clean build only when the list looks impossible.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;Product → Clean Build Folder&lt;/code&gt; (&lt;code&gt;⇧⌘K&lt;/code&gt;) then &lt;code&gt;⌘B&lt;/code&gt;. Stale module interfaces emit diagnostics for code you already deleted. Do this &lt;em&gt;after&lt;/em&gt; the first round of real fixes, or you throw away the cache that shows what changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Verify with a focused build.&lt;/strong&gt;&lt;br&gt;
Build the single scheme that failed. If the same error returns at a different line, you fixed a cascade rather than a cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading the diagnostic without leaving the IDE
&lt;/h2&gt;

&lt;p&gt;The friction is not Swift — it is that the diagnostic is rendered text you cannot cleanly select. Dragging across a twenty-line note picks up line numbers and breaks at indent boundaries; pasting into a translator scrambles the nesting, and you lose which note belongs to which error.&lt;/p&gt;

&lt;p&gt;So stop moving the text. Select the region on screen and read it in place: capture the rectangle containing the error and its notes, recognize locally, render the result beside the diagnostic. Two properties make this survivable during a build loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nothing touches the clipboard.&lt;/strong&gt; A clipboard overwritten with error text is how the fragment you were about to paste disappears.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local recognition, text-only egress.&lt;/strong&gt; The image stays in memory; only the recognized string goes out for translation. On an NDA'd codebase this is the difference between reviewable and not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cheap wins before adopting anything: &lt;code&gt;⌘5&lt;/code&gt; for the navigator, &lt;code&gt;⇧⌘K&lt;/code&gt; for clean build, &lt;code&gt;⌥&lt;/code&gt;-click a symbol for the documentation popover instead of opening a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not solve
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Failures that only reproduce on a device (simulator logs differ)&lt;/li&gt;
&lt;li&gt;Linker errors naming a symbol you never wrote — usually a transitive dependency&lt;/li&gt;
&lt;li&gt;Toolchain mismatch after an Xcode update: that needs &lt;code&gt;xcode-select&lt;/code&gt; and the toolchain list, not reading skill&lt;/li&gt;
&lt;li&gt;Diagnostics in a non-English locale, where the note structure differs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;16:9 walkthrough (Ep3, Xcode errors):&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=sU03dDj9080" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=sU03dDj9080&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Xcode error flow, direct download page:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/xcode-swift-build-error-japanese/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=xcode16_concurrency" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/xcode-swift-build-error-japanese/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=xcode16_concurrency&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

</description>
      <category>swift</category>
      <category>macos</category>
      <category>xcode</category>
      <category>concurrency</category>
    </item>
    <item>
      <title>Playing unlocalised Steam indie games on a Mac without alt-tabbing: screen-region OCR</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sat, 21 Nov 2026 15:07:08 +0000</pubDate>
      <link>https://dev.to/dayu510/playing-unlocalised-steam-indimacosgamingocrsteame-games-on-a-mac-without-alt-tabbing-5c7</link>
      <guid>https://dev.to/dayu510/playing-unlocalised-steam-indimacosgamingocrsteame-games-on-a-mac-without-alt-tabbing-5c7</guid>
      <description>&lt;p&gt;Steam's indie catalogue is full of games that never get a Japanese localisation — or get one two years later. If you play on a Mac, the usual workarounds are all bad: hold your phone up to the monitor and run Google Lens, or &lt;code&gt;⌘Tab&lt;/code&gt; out to a browser translator and lose the fullscreen state, the audio, and the pacing.&lt;/p&gt;

&lt;p&gt;This is a practical guide for playing unlocalised games on macOS without breaking the game's presentation: how the workaround breaks down technically, and what a screen-region OCR flow looks like in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the obvious workarounds fail
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Phone camera OCR.&lt;/strong&gt; It works, once. Then you are holding a phone in one hand while the game wants both hands, the autofocus hunts across a dark fantasy UI, and the phone's OCR has no idea the text is in a decorative serif with drop shadows. Usable for a static menu, hopeless for dialogue that advances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alt-tab to a browser.&lt;/strong&gt; Two costs: fullscreen state is lost (many games re-initialise the swap chain and stutter on return), and the dialogue box you wanted is now gone, because the game only renders it while focused. You end up screenshotting before switching, which is the same workflow with extra steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Copy-paste, when the game allows it.&lt;/strong&gt; Most do not. Game engines render UI to a surface; there is no text layer to select, so &lt;code&gt;⌘C&lt;/code&gt; returns nothing. This is the same class of problem as an Electron app drawn on canvas.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually works: OCR the region, not the window
&lt;/h2&gt;

&lt;p&gt;The constraint that matters is "do not take focus away from the game". Everything else follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The capture must be a region the user draws, not the whole screen — full-screen OCR on a game UI mixes HUD, subtitles, and dialogue into one blob.&lt;/li&gt;
&lt;li&gt;Recognition must be local, because you are not going to upload frames of a game you own to a third party every 20 seconds.&lt;/li&gt;
&lt;li&gt;The output must be a floating panel that does not activate, so the game keeps its input focus.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On macOS, Apple Vision gives you (2) with &lt;code&gt;VNRecognizeTextRequest&lt;/code&gt;, and &lt;code&gt;NSPanel&lt;/code&gt; with &lt;code&gt;.nonactivatingPanel&lt;/code&gt; gives you (3). The flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⌃S  →  drag a rectangle over the dialogue
     →  CGImage (in memory only)
     →  VNRecognizeTextRequest
     →  text  →  translation
     →  floating panel, game still focused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Settings that matter for game UI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNRecognizeTextRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accurate&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"en-US"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usesLanguageCorrection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minimumTextHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;usesLanguageCorrection = false&lt;/code&gt;: game dialogue is full of invented nouns, item names, and proper nouns. Language correction rewrites them into dictionary words, which is exactly wrong here.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minimumTextHeight&lt;/code&gt; needs an explicit value. Decorative fonts with tall ascenders and small x-height silently vanish under the default threshold.&lt;/li&gt;
&lt;li&gt;Recognition languages ordered by what you actually read; for a Japanese player reading English dialogue, English first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Practical tips from actual play
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Select the dialogue box, not the whole frame.&lt;/strong&gt; HUD elements and quest markers add noise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let the panel pin.&lt;/strong&gt; Position it near the subtitle area so your eyes do not travel; the point of the whole exercise is not breaking gaze.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not select over animated backgrounds.&lt;/strong&gt; Particle effects and bloom behind text reduce accuracy noticeably; scroll the dialogue to a calmer frame if the game allows it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skip stylised logos and title art.&lt;/strong&gt; Decorative display type is where OCR fails first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Text rendered in a hand-written or heavily stylised display face can fail&lt;/li&gt;
&lt;li&gt;Low-contrast subtitles over bright scenes (snow, skyboxes) are unreliable&lt;/li&gt;
&lt;li&gt;Text smaller than roughly 10px on a 1440p frame, unless you crop tighter&lt;/li&gt;
&lt;li&gt;Rotated or perspective-skewed UI text (some racing/inventory layouts)&lt;/li&gt;
&lt;li&gt;Everything that is not text: icons, minimaps, damage numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also worth stating plainly: recognition is local, translation is a network call. Offline, you get OCR and no translation — which for a single-player game with a text-heavy quest log is still sometimes enough to get unstuck.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to get it
&lt;/h2&gt;

&lt;p&gt;Screen-region OCR flow for exactly this use case:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/mac-screenshot-ocr-screen-translate/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=steam_game" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/mac-screenshot-ocr-screen-translate/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=steam_game&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;If a game does not localise, the fix is not "translate the game" — it is "translate the rectangle the player is looking at, without touching focus or the clipboard". Once you frame it that way, the technical requirements are obvious, and the workarounds you were using stop looking acceptable.&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>automation</category>
      <category>softwaremacos</category>
    </item>
    <item>
      <title>macOS Sequoia broke your translation shortcut: an on-device OCR architecture instead</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sat, 21 Nov 2026 14:56:48 +0000</pubDate>
      <link>https://dev.to/dayu510/macos-sequoia-broke-your-translation-shortcut-an-on-device-ocr-architecture-instead-53fc</link>
      <guid>https://dev.to/dayu510/macos-sequoia-broke-your-translation-shortcut-an-on-device-ocr-architecture-instead-53fc</guid>
      <description>&lt;p&gt;If you ship a Mac app that translates text, macOS Sequoia has probably broken something for you. Two classes of breakage show up repeatedly in the field: accessibility-based shortcuts that go silent after an OS update, and clipboard-driven clients that overwrite whatever the developer had in the buffer.&lt;/p&gt;

&lt;p&gt;This post walks through the failure modes and an architecture that sidesteps both: capture a screen region, OCR it on-device with Apple Vision, send only the recognized text out, and render the result in a floating panel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 1: the shortcut goes silent
&lt;/h2&gt;

&lt;p&gt;Global shortcuts in translation clients commonly depend on either an event tap or accessibility (AX) permissions. Both are governed by TCC. After an OS update or a restore, the entry can desynchronize: the app still runs, the menu item still works, and the hotkey does nothing. There is no error dialog — just silence.&lt;/p&gt;

&lt;p&gt;Practical checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the app appear in System Settings → Privacy &amp;amp; Security → Accessibility, and is it still checked?&lt;/li&gt;
&lt;li&gt;Toggle it off, quit the app, toggle it back on, relaunch. Re-registration is often what fixes the desync.&lt;/li&gt;
&lt;li&gt;If the app uses an event tap, confirm &lt;code&gt;CGEvent.tapCreate&lt;/code&gt; succeeded; a tap created before the permission was granted returns nil and stays nil until recreated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Failure mode 2: the clipboard gets stolen
&lt;/h2&gt;

&lt;p&gt;Clipboard-watching clients read &lt;code&gt;NSPasteboard.general&lt;/code&gt;. Two properties matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every write increments &lt;code&gt;changeCount&lt;/code&gt;, so a poller can detect changes cheaply.&lt;/li&gt;
&lt;li&gt;Some types carry intent markers — &lt;code&gt;org.nspasteboard.TransientType&lt;/code&gt;, &lt;code&gt;org.nspasteboard.ConcealedType&lt;/code&gt;, &lt;code&gt;org.nspasteboard.AutoGeneratedType&lt;/code&gt;. Clipboard managers skip those; naive pollers do not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is how an API key ends up being translated: it was copied, the poller read it, and the content was shipped to a translation endpoint. If your workflow depends on the clipboard, at minimum check the type markers before acting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure mode 3: the governance question
&lt;/h2&gt;

&lt;p&gt;Sending a screenshot of an internal log, a stack trace, or a customer record to a cloud OCR service is a decision someone has to sign off on. On many teams, that sign-off never arrives — which is why "just use a screenshot translator" quietly dies.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that avoids all three
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Screen region (⌃S)
      │
      ▼
CGImage in RAM (never written to disk)
      │
      ▼
VNRecognizeTextRequest (on-device)
      │
      ▼
Recognized text only
      │
      ▼
Translation request (text, not pixels)
      │
      ▼
Floating NSPanel next to the selection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  On-device recognition
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNRecognizeTextRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accurate&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"en-US"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usesLanguageCorrection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNImageRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cgImage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cgImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&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;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;??&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;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compactMap&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;topCandidates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image never leaves the process. If you keep &lt;code&gt;usesLanguageCorrection = false&lt;/code&gt;, stack traces and identifiers survive intact; turning it on rewrites tokens into dictionary words and mangles paths.&lt;/p&gt;

&lt;h3&gt;
  
  
  Text-only egress
&lt;/h3&gt;

&lt;p&gt;Only the recognized string is sent to the translation endpoint. That single design choice changes the security review conversation: the artifact crossing the network is text the user chose to read, not a screenshot of their desktop.&lt;/p&gt;

&lt;p&gt;Be explicit about the trade-off: recognition is local, translation is a network call. Offline, you get OCR and no translation. Users deserve to know which half needs connectivity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Non-activating overlay
&lt;/h3&gt;

&lt;p&gt;An &lt;code&gt;NSPanel&lt;/code&gt; with &lt;code&gt;.nonactivatingPanel&lt;/code&gt; floats above the selection without stealing focus, so the editor keeps its caret and the user keeps their place. No app switching, no clipboard write.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not fix
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Text too small to render legibly on screen&lt;/li&gt;
&lt;li&gt;Low contrast, overlays, watermarks&lt;/li&gt;
&lt;li&gt;Rotated or heavily italic text&lt;/li&gt;
&lt;li&gt;Math: sub/superscript association is lost in any linear read&lt;/li&gt;
&lt;li&gt;Network-loss translation: OCR still works, translation does not&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Trying it
&lt;/h2&gt;

&lt;p&gt;DeepL-style shortcut breakage on Sequoia, and the region-OCR alternative:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/solutions/deepl-shortcut-not-working-alternative/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=deepl_sequoiamacos" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/solutions/deepl-shortcut-not-working-alternative/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=deepl_sequoiamacos&lt;/a&gt;&lt;br&gt;
swift&lt;br&gt;
ocr&lt;br&gt;
translation&lt;/p&gt;

&lt;p&gt;Distribution page (BOOTH):&lt;br&gt;
&lt;a href="https://zipp-mac.booth.pm/items/9082185" rel="noopener noreferrer"&gt;https://zipp-mac.booth.pm/items/9082185&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo (YouTube, ep.2):&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=4_tQzj7VB_I" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=4_tQzj7VB_I&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Two of the three failure modes are permission and buffer ownership problems, not translation problems. Moving the input from "whatever is in the clipboard" to "a rectangle the user selected" removes the shared mutable state entirely — and makes the privacy story easy to state in one sentence.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>developer</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Reading unselectable Xcode/Unity errors: rectangle OCR with Apple Vision on macOS</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sat, 21 Nov 2026 14:11:00 +0000</pubDate>
      <link>https://dev.to/dayu510/reading-unselectable-xcodeunity-errors-rectangle-ocr-with-apple-vision-on-macos-5f37</link>
      <guid>https://dev.to/dayu510/reading-unselectable-xcodeunity-errors-rectangle-ocr-with-apple-vision-on-macos-5f37</guid>
      <description>&lt;p&gt;Xcode and Unity errors are often visible on screen but impossible to select. Runtime crash dialogs, plugin warnings rendered by native UI, Electron renderer panes — &lt;code&gt;⌘C&lt;/code&gt; returns nothing because these surfaces are not text views. If your translation workflow depends on the clipboard, it silently dies there.&lt;/p&gt;

&lt;p&gt;This is an implementation note on reading those errors with Apple Vision (&lt;code&gt;VNRecognizeTextRequest&lt;/code&gt;) from a screen rectangle: how to capture, how to convert coordinates, how to reduce misreads, and where the approach honestly stops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capturing the screen: CGWindowList vs ScreenCaptureKit
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;CGWindowListCreateImage&lt;/code&gt; lets you grab a single window, which is less noisy than the full desktop. It is deprecated from macOS 14 onward, so treat it as a fallback.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SCScreenshotManager&lt;/code&gt; / &lt;code&gt;SCStream&lt;/code&gt; is the current path, available per-window and per-display. It is async, which makes cancellation easier when the user re-triggers the shortcut.&lt;/p&gt;

&lt;p&gt;Both require Screen Recording permission, and both &lt;strong&gt;fail silently&lt;/strong&gt; without it: the call succeeds and returns an image of the wallpaper. Guard with a cheap check — if the image is nearly uniform, treat it as a failed capture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retina: points are not pixels
&lt;/h2&gt;

&lt;p&gt;Window coordinates are points; the captured image is in pixels. On a Retina display the factor is 2, so using points directly crops half the region.&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;let&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backingScaleFactor&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;pixelRect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CGRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pointRect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minX&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pointRect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minY&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pointRect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pointRect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two flips then stack up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Window coordinates are top-left origin; &lt;code&gt;CGImage&lt;/code&gt; cropping is also top-left.&lt;/li&gt;
&lt;li&gt;Vision's &lt;code&gt;boundingBox&lt;/code&gt; is &lt;strong&gt;normalized with a bottom-left origin&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To map a result back to the image:&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;let&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;boundingBox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minX&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nc"&gt;CGFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;boundingBox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;maxY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nc"&gt;CGFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mixing these two flips produces the classic "top edge lines up, bottom edge drifts" bug. Keep the transform in one function and test it by placing known glyphs in the four corners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Request configuration that survives error logs
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNRecognizeTextRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accurate&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"en-US"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ja-JP"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usesLanguageCorrection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minimumTextHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.008&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;usesLanguageCorrection = false&lt;/code&gt; — stack traces and paths are full of tokens that are not dictionary words; correction rewrites them into something else.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minimumTextHeight&lt;/code&gt; — the default silently drops small text. Measure what 11pt looks like as a fraction of image height in your capture.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;recognitionLanguages&lt;/code&gt; — order matters for mixed-language UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rectangle hygiene
&lt;/h2&gt;

&lt;p&gt;Accuracy is mostly decided by padding, not by the model.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Too tight: glyph antialiasing is cut, &lt;code&gt;rn&lt;/code&gt; becomes &lt;code&gt;m&lt;/code&gt;, &lt;code&gt;1&lt;/code&gt; becomes &lt;code&gt;l&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Too loose: adjacent columns and line numbers leak in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At 2x scale, 4–8px of padding worked. Three preprocessing steps earned their keep: grayscale (subpixel color fringing), contrast normalization (translucent dark-mode windows), and 2x upscaling with bicubic interpolation for small captures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reassembling lines
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;VNRecognizedTextObservation&lt;/code&gt; arrives per line. Group by vertical gaps: within 1.5x the glyph height is the same paragraph, beyond that is a new block. For stack traces, keep &lt;code&gt;boundingBox.minX&lt;/code&gt; so indentation can be restored — depth is information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this stops working
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Text too small to resolve on screen (zooming does not create information)&lt;/li&gt;
&lt;li&gt;Low contrast: pale grey on white, overlays, watermarks&lt;/li&gt;
&lt;li&gt;Rotated or heavily italic text&lt;/li&gt;
&lt;li&gt;Lines of pure punctuation (&lt;code&gt;}&lt;/code&gt;, &lt;code&gt;--&amp;gt;&lt;/code&gt;) that need context&lt;/li&gt;
&lt;li&gt;Math: sub/superscript association is lost in any linear reading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a human cannot read it on screen, the rectangle path will not either. Zoom first, then select.&lt;/p&gt;

&lt;h2&gt;
  
  
  See it running
&lt;/h2&gt;

&lt;p&gt;Demo of macos&lt;br&gt;
swift&lt;br&gt;
ocr&lt;br&gt;
xcode&lt;br&gt;
the rectangle workflow (YouTube):&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=4_tQzj7VB_I" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=4_tQzj7VB_I&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reference tool: Zipp (Mac)&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=xcode_vision_ocr" rel="noopener noreferrer"&gt;https://www.zipp-mac.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=xcode_vision_ocr&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Unselectable errors are not "untranslatable" — they are simply not on the clipboard. Get capture permission and failure detection right, keep points and pixels separate, and isolate the Vision coordinate flip. Everything after that is padding and &lt;code&gt;minimumTextHeight&lt;/code&gt; tuning.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>ios</category>
      <category>programming</category>
      <category>swift</category>
    </item>
    <item>
      <title>5 Uncopyable macOS Errors Developers Hit Weekly (Gatekeeper, Xcode codesign, Rust ld, Homebrew, Two-Column PDFs) — Real Screenshots &amp; Quick Triage</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Wed, 18 Nov 2026 10:24:45 +0000</pubDate>
      <link>https://dev.to/dayu510/5-uncopyable-macos-errors-developers-hit-weekly-gatekeeper-xcode-codesign-rust-ld-homebrew-509j</link>
      <guid>https://dev.to/dayu510/5-uncopyable-macos-errors-developers-hit-weekly-gatekeeper-xcode-codesign-rust-ld-homebrew-509j</guid>
      <description>&lt;h2&gt;
  
  
  The common thread
&lt;/h2&gt;

&lt;p&gt;Some macOS errors are &lt;strong&gt;not selectable text&lt;/strong&gt;. They are drawn: dialogs, IDE overlays, console panes, the page image of a PDF. You cannot drag-select them, you cannot copy them, and &lt;code&gt;Cmd+F&lt;/code&gt; finds nothing.&lt;/p&gt;

&lt;p&gt;That changes the workflow. Normally you copy the message, paste it into a search engine, and read. Here you first have to &lt;strong&gt;get the text out&lt;/strong&gt;. Below are five errors I hit repeatedly, each with the real triage commands first — and a note on the reading problem second.&lt;/p&gt;

&lt;p&gt;Every screenshot is a real screen, reproduced as a before/after comparison.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Gatekeeper: "cannot be opened because the developer cannot be verified"
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1ez0u187ghahalphhjn.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1ez0u187ghahalphhjn.png" alt="Gatekeeper dialog on macOS" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"AppName" cannot be opened because the developer cannot be verified.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The variant that makes people panic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"AppName" is damaged and can't be opened. You should move it to the Trash.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither means the binary is corrupt. Check, in order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. is the quarantine attribute attached?&lt;/span&gt;
xattr -l /Applications/AppName.app

&lt;span class="c"&gt;# 2. what does Gatekeeper think?&lt;/span&gt;
spctl --assess --type execute -vv /Applications/AppName.app

&lt;span class="c"&gt;# 3. is it signed at all?&lt;/span&gt;
codesign -dv --verbose=4 /Applications/AppName.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;codesign&lt;/code&gt; reports &lt;code&gt;code object is not signed at all&lt;/code&gt;, the build is unsigned — usually an ad-hoc distribution. If the distributor is trustworthy and only the quarantine flag blocks it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xattr -dr com.apple.quarantine /Applications/AppName.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or from the GUI: &lt;strong&gt;right-click → Open → Open&lt;/strong&gt; once.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The expensive mistake is deleting the app because the dialog said "damaged".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/gatekeeper-developer-cannot-be-verified/?utm_source=devto" rel="noopener noreferrer"&gt;Gatekeeper triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Xcode: &lt;code&gt;codesign failed with exit code 1&lt;/code&gt;
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffodztm3mjulsjuecavjq.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffodztm3mjulsjuecavjq.png" alt="Xcode code sign error" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Command /usr/bin/codesign failed with exit code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things determine this, in this order: &lt;strong&gt;certificate → provisioning profile → Bundle ID&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. do we have a usable signing identity?&lt;/span&gt;
security find-identity -v -p codesigning

&lt;span class="c"&gt;# 2. what is the build actually going to use?&lt;/span&gt;
xcodebuild -showBuildSettings 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -iE &lt;span class="s2"&gt;"CODE_SIGN|provisioning|DEVELOPMENT_TEAM"&lt;/span&gt;

&lt;span class="c"&gt;# 3. what happened, verbosely?&lt;/span&gt;
xcodebuild -scheme YourScheme -configuration Debug build 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -iE &lt;span class="s2"&gt;"codesign|signing|profile"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The three common causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;security find-identity&lt;/code&gt; returns &lt;strong&gt;0 valid identities&lt;/strong&gt; → no certificate in the keychain&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DEVELOPMENT_TEAM&lt;/code&gt; is empty → no team selected&lt;/li&gt;
&lt;li&gt;profile Bundle ID ≠ target Bundle ID&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Verify an already-built product:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codesign --verify --deep --strict --verbose=2 App.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/xcode-codesign-exit-code-1/?utm_source=devto" rel="noopener noreferrer"&gt;Xcode codesign triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Rust / Cargo: the linker error is a &lt;em&gt;result&lt;/em&gt;, not a cause
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld6lcmpfahrmrng78lu9.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld6lcmpfahrmrng78lu9.png" alt="Rust linker error in a terminal" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: linking with `cc` failed: exit code: 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cause is a few lines above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So read backwards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# pull the linker lines, not only the last line&lt;/span&gt;
cargo build 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; grep -nE &lt;span class="s2"&gt;"ld:|undefined|note: reference|error:"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -40

&lt;span class="c"&gt;# what did the linker actually try?&lt;/span&gt;
cargo build -v 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; tail -60

&lt;span class="c"&gt;# what does the binary ask for?&lt;/span&gt;
otool -L target/debug/your_bin &lt;span class="o"&gt;|&lt;/span&gt; head
nm -u target/debug/your_bin &lt;span class="o"&gt;|&lt;/span&gt; head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical causes: architecture mismatch (&lt;code&gt;arm64&lt;/code&gt; vs &lt;code&gt;x86_64&lt;/code&gt;), an unresolved C/Objective-C symbol from &lt;code&gt;build.rs&lt;/code&gt;, or a library path that needs &lt;code&gt;RUSTFLAGS="-L /opt/homebrew/lib"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/rust-cargo-linker-error/?utm_source=devto" rel="noopener noreferrer"&gt;Rust linker triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Homebrew: &lt;code&gt;undefined method&lt;/code&gt; / &lt;code&gt;invalid option&lt;/code&gt;
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdei38kd2zagvzdm8rz4b.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdei38kd2zagvzdm8rz4b.png" alt="Homebrew error in a macOS terminal" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: undefined method `writable?' for nil:NilClass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: invalid option: --with-python3.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Homebrew puts the conclusion on &lt;strong&gt;line 1&lt;/strong&gt;. &lt;code&gt;brew doctor&lt;/code&gt; comes second, not first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. sync the core first&lt;/span&gt;
brew update

&lt;span class="c"&gt;# 2. then read errors only (warnings are normal and noisy)&lt;/span&gt;
brew doctor 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; grep -nE &lt;span class="s2"&gt;"^Error|Warning: "&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -20

&lt;span class="c"&gt;# 3. which prefix are we even using?&lt;/span&gt;
brew --prefix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;invalid option&lt;/code&gt; → the flag was removed (&lt;code&gt;--with-*&lt;/code&gt; is largely gone)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;undefined method&lt;/code&gt; → core/formula version mismatch, usually fixed by &lt;code&gt;brew update&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;still broken → &lt;code&gt;brew reinstall &amp;lt;name&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/homebrew-undefined-method-error/?utm_source=devto" rel="noopener noreferrer"&gt;Homebrew triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Two-column PDFs: copy-paste scrambles the columns
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5bthitcegys3p8leawnp.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5bthitcegys3p8leawnp.png" alt="Two-column paper page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy a paragraph from a two-column paper and the right column's opening gets glued to the left column's ending. Nothing is corrupted — the &lt;strong&gt;reading order&lt;/strong&gt; is wrong, because extraction walks the row, not the column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# does the PDF even have a text layer?&lt;/span&gt;
pdffonts paper.pdf

&lt;span class="c"&gt;# extract preserving layout, then check the order&lt;/span&gt;
pdftotext -layout paper.pdf out.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two fixes that work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Copy per column&lt;/strong&gt; — select only the left column, then only the right one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read a region instead of the stream&lt;/strong&gt; — in Preview, hold &lt;code&gt;⌥&lt;/code&gt; while dragging to force a rectangular selection, or capture the region and read it in place.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/two-column-pdf-reading-order/?utm_source=devto" rel="noopener noreferrer"&gt;Two-column triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Reading the ones you cannot copy
&lt;/h2&gt;

&lt;p&gt;The commands above all assume you can read the message. Half the time you cannot: the dialog has no text layer, the IDE overlay disappears when the pointer moves, the console pane refuses selection.&lt;/p&gt;

&lt;p&gt;What I do instead of re-typing error messages by hand: &lt;strong&gt;press ⌃S, drag a box over the region, read the result in place.&lt;/strong&gt; Escape closes it.&lt;/p&gt;

&lt;p&gt;How it is wired, because the boundary matters for anyone under an NDA:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recognition runs on-device&lt;/strong&gt; via Apple Vision. The screen capture is not uploaded — the image stays local.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translation is online.&lt;/strong&gt; Only the recognized text is sent; the image never is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline&lt;/strong&gt;: recognition still works, translation does not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Environment: &lt;strong&gt;macOS 13 or later, Apple silicon (arm64) only — it does not run on Intel Macs.&lt;/strong&gt; The build is not notarized, so first launch is &lt;strong&gt;right-click → Open&lt;/strong&gt; (see section 1 for why that warning is not corruption).&lt;/p&gt;

&lt;p&gt;The full gallery — 18 real errors, same triage format for each entry:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/errors/unity-metal-compute-shader-error/?utm_source=devto" rel="noopener noreferrer"&gt;Unity の Metal シェーダ警告の切り分け&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The pattern worth keeping
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dialogs are drawings.&lt;/strong&gt; Check &lt;code&gt;spctl&lt;/code&gt; / &lt;code&gt;codesign&lt;/code&gt; / &lt;code&gt;xattr&lt;/code&gt; before trusting the wording.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linker and build errors are bottom-up.&lt;/strong&gt; The last line is the result; the cause is above it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Package managers put the conclusion first.&lt;/strong&gt; Read line 1 before running the doctor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Column order is a layout problem&lt;/strong&gt;, not an OCR accuracy problem. Changing the extraction route fixes the symptom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get the text out without retyping it.&lt;/strong&gt; Re-typing &lt;code&gt;cannot be opened because the developer cannot be verified&lt;/code&gt; from a screenshot is where the hour goes.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>debugging</category>
      <category>rust</category>
      <category>homebrew</category>
      <category>macos</category>
    </item>
    <item>
      <title>5 Uncopyable macOS Errors Developers Hit Weekly (Gatekeeper, Xcode codesign, Rust ld, Homebrew, Two-Column PDFs) — Real Screenshots &amp; Quick Triage</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Mon, 16 Nov 2026 04:09:57 +0000</pubDate>
      <link>https://dev.to/dayu510/5-uncopyable-macos-errors-developers-hit-weekly-gatekeeper-xcode-codesign-rust-ld-homebrew-3kkb</link>
      <guid>https://dev.to/dayu510/5-uncopyable-macos-errors-developers-hit-weekly-gatekeeper-xcode-codesign-rust-ld-homebrew-3kkb</guid>
      <description>&lt;h2&gt;
  
  
  The common thread
&lt;/h2&gt;

&lt;p&gt;Some macOS errors are &lt;strong&gt;not selectable text&lt;/strong&gt;. They are drawn: dialogs, IDE overlays, console panes, the page image of a PDF. You cannot drag-select them, you cannot copy them, and &lt;code&gt;Cmd+F&lt;/code&gt; finds nothing.&lt;/p&gt;

&lt;p&gt;That changes the workflow. Normally you copy the message, paste it into a search engine, and read. Here you first have to &lt;strong&gt;get the text out&lt;/strong&gt;. Below are five errors I hit repeatedly, each with the real triage commands first — and a note on the reading problem second.&lt;/p&gt;

&lt;p&gt;Every screenshot is a real screen, reproduced as a before/after comparison.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Gatekeeper: "cannot be opened because the developer cannot be verified"
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1ez0u187ghahalphhjn.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1ez0u187ghahalphhjn.png" alt="Gatekeeper dialog on macOS" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"AppName" cannot be opened because the developer cannot be verified.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The variant that makes people panic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"AppName" is damaged and can't be opened. You should move it to the Trash.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither means the binary is corrupt. Check, in order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. is the quarantine attribute attached?&lt;/span&gt;
xattr -l /Applications/AppName.app

&lt;span class="c"&gt;# 2. what does Gatekeeper think?&lt;/span&gt;
spctl --assess --type execute -vv /Applications/AppName.app

&lt;span class="c"&gt;# 3. is it signed at all?&lt;/span&gt;
codesign -dv --verbose=4 /Applications/AppName.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;codesign&lt;/code&gt; reports &lt;code&gt;code object is not signed at all&lt;/code&gt;, the build is unsigned — usually an ad-hoc distribution. If the distributor is trustworthy and only the quarantine flag blocks it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xattr -dr com.apple.quarantine /Applications/AppName.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or from the GUI: &lt;strong&gt;right-click → Open → Open&lt;/strong&gt; once.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The expensive mistake is deleting the app because the dialog said "damaged".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/gatekeeper-developer-cannot-be-verified/?utm_source=devto" rel="noopener noreferrer"&gt;Gatekeeper triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Xcode: &lt;code&gt;codesign failed with exit code 1&lt;/code&gt;
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffodztm3mjulsjuecavjq.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffodztm3mjulsjuecavjq.png" alt="Xcode code sign error" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Command /usr/bin/codesign failed with exit code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things determine this, in this order: &lt;strong&gt;certificate → provisioning profile → Bundle ID&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. do we have a usable signing identity?&lt;/span&gt;
security find-identity -v -p codesigning

&lt;span class="c"&gt;# 2. what is the build actually going to use?&lt;/span&gt;
xcodebuild -showBuildSettings 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -iE &lt;span class="s2"&gt;"CODE_SIGN|provisioning|DEVELOPMENT_TEAM"&lt;/span&gt;

&lt;span class="c"&gt;# 3. what happened, verbosely?&lt;/span&gt;
xcodebuild -scheme YourScheme -configuration Debug build 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -iE &lt;span class="s2"&gt;"codesign|signing|profile"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The three common causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;security find-identity&lt;/code&gt; returns &lt;strong&gt;0 valid identities&lt;/strong&gt; → no certificate in the keychain&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DEVELOPMENT_TEAM&lt;/code&gt; is empty → no team selected&lt;/li&gt;
&lt;li&gt;profile Bundle ID ≠ target Bundle ID&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Verify an already-built product:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codesign --verify --deep --strict --verbose=2 App.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/xcode-codesign-exit-code-1/?utm_source=devto" rel="noopener noreferrer"&gt;Xcode codesign triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Rust / Cargo: the linker error is a &lt;em&gt;result&lt;/em&gt;, not a cause
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld6lcmpfahrmrng78lu9.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld6lcmpfahrmrng78lu9.png" alt="Rust linker error in a terminal" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: linking with `cc` failed: exit code: 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cause is a few lines above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So read backwards:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# pull the linker lines, not only the last line&lt;/span&gt;
cargo build 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; grep -nE &lt;span class="s2"&gt;"ld:|undefined|note: reference|error:"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -40

&lt;span class="c"&gt;# what did the linker actually try?&lt;/span&gt;
cargo build -v 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; tail -60

&lt;span class="c"&gt;# what does the binary ask for?&lt;/span&gt;
otool -L target/debug/your_bin &lt;span class="o"&gt;|&lt;/span&gt; head
nm -u target/debug/your_bin &lt;span class="o"&gt;|&lt;/span&gt; head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical causes: architecture mismatch (&lt;code&gt;arm64&lt;/code&gt; vs &lt;code&gt;x86_64&lt;/code&gt;), an unresolved C/Objective-C symbol from &lt;code&gt;build.rs&lt;/code&gt;, or a library path that needs &lt;code&gt;RUSTFLAGS="-L /opt/homebrew/lib"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/rust-cargo-linker-error/?utm_source=devto" rel="noopener noreferrer"&gt;Rust linker triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Homebrew: &lt;code&gt;undefined method&lt;/code&gt; / &lt;code&gt;invalid option&lt;/code&gt;
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdei38kd2zagvzdm8rz4b.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdei38kd2zagvzdm8rz4b.png" alt="Homebrew error in a macOS terminal" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: undefined method `writable?' for nil:NilClass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: invalid option: --with-python3.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Homebrew puts the conclusion on &lt;strong&gt;line 1&lt;/strong&gt;. &lt;code&gt;brew doctor&lt;/code&gt; comes second, not first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. sync the core first&lt;/span&gt;
brew update

&lt;span class="c"&gt;# 2. then read errors only (warnings are normal and noisy)&lt;/span&gt;
brew doctor 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; grep -nE &lt;span class="s2"&gt;"^Error|Warning: "&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -20

&lt;span class="c"&gt;# 3. which prefix are we even using?&lt;/span&gt;
brew --prefix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;invalid option&lt;/code&gt; → the flag was removed (&lt;code&gt;--with-*&lt;/code&gt; is largely gone)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;undefined method&lt;/code&gt; → core/formula version mismatch, usually fixed by &lt;code&gt;brew update&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;still broken → &lt;code&gt;brew reinstall &amp;lt;name&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/homebrew-undefined-method-error/?utm_source=devto" rel="noopener noreferrer"&gt;Homebrew triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Two-column PDFs: copy-paste scrambles the columns
&lt;/h2&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5bthitcegys3p8leawnp.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5bthitcegys3p8leawnp.png" alt="Two-column paper page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy a paragraph from a two-column paper and the right column's opening gets glued to the left column's ending. Nothing is corrupted — the &lt;strong&gt;reading order&lt;/strong&gt; is wrong, because extraction walks the row, not the column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# does the PDF even have a text layer?&lt;/span&gt;
pdffonts paper.pdf

&lt;span class="c"&gt;# extract preserving layout, then check the order&lt;/span&gt;
pdftotext -layout paper.pdf out.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two fixes that work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Copy per column&lt;/strong&gt; — select only the left column, then only the right one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read a region instead of the stream&lt;/strong&gt; — in Preview, hold &lt;code&gt;⌥&lt;/code&gt; while dragging to force a rectangular selection, or capture the region and read it in place.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;→ &lt;a href="https://www.zipp-mac.com/errors/two-column-pdf-reading-order/?utm_source=devto" rel="noopener noreferrer"&gt;Two-column triage page&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Reading the ones you cannot copy
&lt;/h2&gt;

&lt;p&gt;The commands above all assume you can read the message. Half the time you cannot: the dialog has no text layer, the IDE overlay disappears when the pointer moves, the console pane refuses selection.&lt;/p&gt;

&lt;p&gt;What I do instead of re-typing error messages by hand: &lt;strong&gt;press ⌃S, drag a box over the region, read the result in place.&lt;/strong&gt; Escape closes it.&lt;/p&gt;

&lt;p&gt;How it is wired, because the boundary matters for anyone under an NDA:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recognition runs on-device&lt;/strong&gt; via Apple Vision. The screen capture is not uploaded — the image stays local.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translation is online.&lt;/strong&gt; Only the recognized text is sent; the image never is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline&lt;/strong&gt;: recognition still works, translation does not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Environment: &lt;strong&gt;macOS 13 or later, Apple silicon (arm64) only — it does not run on Intel Macs.&lt;/strong&gt; The build is not notarized, so first launch is &lt;strong&gt;right-click → Open&lt;/strong&gt; (see section 1 for why that warning is not corruption).&lt;/p&gt;

&lt;p&gt;The full gallery — 18 real errors, same triage format for each entry:&lt;br&gt;
&lt;a href="https://www.zipp-mac.com/errors/unity-metal-compute-shader-error/?utm_source=devto" rel="noopener noreferrer"&gt;Unity の Metal シェーダ警告の切り分け&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The pattern worth keeping
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dialogs are drawings.&lt;/strong&gt; Check &lt;code&gt;spctl&lt;/code&gt; / &lt;code&gt;codesign&lt;/code&gt; / &lt;code&gt;xattr&lt;/code&gt; before trusting the wording.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linker and build errors are bottom-up.&lt;/strong&gt; The last line is the result; the cause is above it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Package managers put the conclusion first.&lt;/strong&gt; Read line 1 before running the doctor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Column order is a layout problem&lt;/strong&gt;, not an OCR accuracy problem. Changing the extraction route fixes the symptom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get the text out without retyping it.&lt;/strong&gt; Re-typing &lt;code&gt;cannot be opened because the developer cannot be verified&lt;/code&gt; from a screenshot is where the hour goes.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>homebrew</category>
      <category>macos</category>
      <category>debugging</category>
      <category>rust</category>
    </item>
    <item>
      <title>Building a Privacy-First Desktop OCR &amp; Translation Pipeline for macOS: Deep Dive into Apple Vision Framework</title>
      <dc:creator>Zane — 個人開発メモ</dc:creator>
      <pubDate>Sun, 15 Nov 2026 04:41:54 +0000</pubDate>
      <link>https://dev.to/dayu510/building-a-privacy-first-desktop-ocr-translation-pipeline-for-macos-deep-dive-into-apple-vision-1kmj</link>
      <guid>https://dev.to/dayu510/building-a-privacy-first-desktop-ocr-translation-pipeline-for-macos-deep-dive-into-apple-vision-1kmj</guid>
      <description>&lt;p&gt;As developers and researchers, our desktop screens display our most sensitive intellectual property: uncommitted proprietary code, confidential game crash logs, private API keys, and draft academic papers.&lt;/p&gt;

&lt;p&gt;Yet, many popular desktop translation utilities take an alarming architectural shortcut: &lt;strong&gt;they capture your screen and ship the entire raw PNG/JPEG image directly to cloud-hosted computer vision APIs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this technical breakdown, we explore how to build a &lt;strong&gt;Privacy-First Desktop OCR &amp;amp; Translation Architecture&lt;/strong&gt; on macOS. By leveraging Apple's native &lt;strong&gt;Vision Framework&lt;/strong&gt; and &lt;strong&gt;ScreenCaptureKit&lt;/strong&gt;, we ensure that image frames never leave the user's local machine, while only sanitized textual tokens cross the network boundary.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Flaw of Cloud-First Screen Translation
&lt;/h2&gt;

&lt;p&gt;When an application asks for macOS &lt;code&gt;Screen Recording&lt;/code&gt; permissions, it gains access to every pixel rendered on the display. &lt;/p&gt;

&lt;p&gt;The traditional cloud-dependent pipeline suffers from severe structural vulnerabilities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Accidental Context Leakage&lt;/strong&gt;: Cropping a 200x200 pixel error dialog often accidentally captures adjacent IDE tabs, Slack notifications, or browser credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bandwidth Overhead &amp;amp; High Latency&lt;/strong&gt;: Uploading high-DPI Retina frames (often 5MB to 15MB uncompressed) introduces significant network lag (500ms - 2000ms).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Retention &amp;amp; Compliance Violations&lt;/strong&gt;: Transmitting visual screen data violates enterprise NDAs, HIPAA, and GDPR regulations.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Architectural Blueprint: The Two-Tier Isolation Model
&lt;/h2&gt;

&lt;p&gt;To eliminate these vulnerabilities, we enforce a strict &lt;strong&gt;Two-Tier Isolation Model&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ┌─────────────────────────────────────────────────────────┐
 │               Tier 1: Local Machine Boundary            │
 │                                                         │
 │  Display Framebuffer                                    │
 │         │                                               │
 │         ▼ (ScreenCaptureKit)                            │
 │  In-Memory CVPixelBuffer                                │
 │         │                                               │
 │         ▼ (Zero Disk I/O)                               │
 │  Apple Vision Framework (VNRecognizeTextRequest)        │
 │  [Neural Engine / Metal Accelerator]                    │
 │         │                                               │
 │         ├──────────────────────────┐                    │
 │         ▼                          ▼                    │
 │  Extracted Text String       Pixel Buffer Deallocated   │
 │  (Clean UTF-8 Tokens)        (Immediate Zeroing in RAM) │
 └─────────┬───────────────────────────────────────────────┘
           │
           ▼ (HTTPS POST: Text payload only)
 ┌─────────────────────────────────────────────────────────┐
 │               Tier 2: External Translation Engine       │
 │                                                         │
 │  Payload: {"q": "Fatal error: Index out of range"}      │
 │  (NO pixel data, NO screen coordinates, NO identifiers) │
 └─────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Core Invariants of the System
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Invariant 1 (Zero-Image Egress)&lt;/strong&gt;: No network transport layer in the application has access to image buffers or file descriptors pointing to image files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invariant 2 (Ephemeral Lifecycles)&lt;/strong&gt;: Captured pixel buffers reside strictly in volatile RAM within an &lt;code&gt;autoreleasepool&lt;/code&gt;. They are deallocated immediately upon OCR observation extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invariant 3 (Sanitized Text Payloads)&lt;/strong&gt;: The external translation API receives solely the extracted Unicode text strings required for linguistic translation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Swift Implementation: High-Throughput Local OCR
&lt;/h2&gt;

&lt;p&gt;Here is the production-ready Swift implementation demonstrating synchronous local OCR execution with &lt;code&gt;VNRecognizeTextRequestRevision3&lt;/code&gt;:&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="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Foundation&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Vision&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;CoreGraphics&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;LocalOCRService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;RecognitionResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Float&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;boundingBox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;CGRect&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;/// Executes on-device text recognition on a memory-backed CGImage.&lt;/span&gt;
    &lt;span class="c1"&gt;/// - Parameters:&lt;/span&gt;
    &lt;span class="c1"&gt;///   - cgImage: In-memory image reference. Never written to disk.&lt;/span&gt;
    &lt;span class="c1"&gt;///   - recognitionLanguages: Preferred BCP-47 language codes.&lt;/span&gt;
    &lt;span class="c1"&gt;/// - Returns: Array of sanitized recognized lines.&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;recognizeText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cgImage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;CGImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;recognitionLanguages&lt;/span&gt;&lt;span class="p"&gt;:&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="s2"&gt;"en-US"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ja-JP"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;)&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="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;RecognitionResult&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;RecognitionResult&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="p"&gt;]&lt;/span&gt;

        &lt;span class="c1"&gt;// Scope memory footprint strictly within an autorelease pool&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;autoreleasepool&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNRecognizeTextRequest&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
                &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;observations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;VNRecognizedTextObservation&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;observations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compactMap&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;obs&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
                    &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;topCandidate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;topCandidates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
                    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;RecognitionResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;topCandidate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;topCandidate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="n"&gt;boundingBox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;obs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;boundingBox&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;span class="c1"&gt;// Configuration for maximum fidelity on technical terms&lt;/span&gt;
            &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;revision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNRecognizeTextRequestRevision3&lt;/span&gt;
            &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accurate&lt;/span&gt;
            &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recognitionLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;recognitionLanguages&lt;/span&gt;
            &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usesLanguageCorrection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
            &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minimumTextHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.012&lt;/span&gt;

            &lt;span class="c1"&gt;// Execute on Apple Silicon Neural Engine / GPU&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;VNImageRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cgImage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cgImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;options&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;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;request&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;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;results&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;h2&gt;
  
  
  Handling Multi-Column Layouts (ArXiv &amp;amp; Research Papers)
&lt;/h2&gt;

&lt;p&gt;Standard PDF selection fails on two-column research papers because the OS text-selection heuristic spans horizontally across column gutters.&lt;/p&gt;

&lt;p&gt;Using Vision bounding boxes, our local pipeline sorts text lines geometrically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Extract normalized bounding box coordinates (&lt;code&gt;CGRect&lt;/code&gt; where &lt;code&gt;(0,0)&lt;/code&gt; is bottom-left).&lt;/li&gt;
&lt;li&gt;Segment observations into spatial clusters based on X-axis midpoint (&lt;code&gt;midX &amp;lt; 0.5&lt;/code&gt; for left column, &lt;code&gt;midX &amp;gt;= 0.5&lt;/code&gt; for right column).&lt;/li&gt;
&lt;li&gt;Order clusters vertically (&lt;code&gt;origin.y&lt;/code&gt; descending) to preserve natural reading flow.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This guarantees that two-column ArXiv papers and complex multi-pane developer documentation are read in proper chronological sequence without cross-column bleeding.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Implementation: Zipp for macOS
&lt;/h2&gt;

&lt;p&gt;If you want to experience this privacy-first workflow without compiling from source, take a look at &lt;strong&gt;Zipp for macOS&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Registration &amp;amp; 100% Free Daily Quota&lt;/strong&gt;: Offers 50 free executions per day without requiring account creation or email submission.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pure Local OCR&lt;/strong&gt;: Built directly on Apple Vision Framework; screen captures never touch an external server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsigned Distribution Note&lt;/strong&gt;: As an independent developer utility, launch it initially via &lt;strong&gt;Right-click → Open&lt;/strong&gt; to clear macOS Gatekeeper verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant Hotkey&lt;/strong&gt;: Hit &lt;code&gt;Ctrl + S&lt;/code&gt;, drag around any unselectable error dialog or foreign text, and inspect the inline translation overlay.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Privacy in developer tooling should never be an afterthought. By delegating computer vision inference to local Apple Silicon hardware and strictly sanitizing outbound network traffic to plain text tokens, we can build low-overhead desktop utilities that honor user confidentiality and enterprise security standards.&lt;/p&gt;




&lt;h3&gt;
  
  
  Requirements &amp;amp; technical boundary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;macOS 13.0+ / Apple Silicon (arm64) only — does not run on Intel Macs&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Recognition: &lt;strong&gt;on-device local OCR via Apple Vision&lt;/strong&gt;; screen captures are never uploaded&lt;/li&gt;
&lt;li&gt;Translation: &lt;strong&gt;online&lt;/strong&gt;; only the &lt;strong&gt;recognized text&lt;/strong&gt; is sent — never the image&lt;/li&gt;
&lt;li&gt;Offline: recognition still works, translation does not&lt;/li&gt;
&lt;li&gt;No account required; the tool is free to use&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If you want to read the deeper notes on this pipeline, the follow-up write-ups live in the open-source awesome-mac list (&lt;a href="https://github.com/jaywcjlove/awesome-mac?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=vision_privacy" rel="noopener noreferrer"&gt;jaywcjlove/awesome-mac&lt;/a&gt;) and on the &lt;a href="https://www.zipp-mac.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=vision_privacy" rel="noopener noreferrer"&gt;project's documentation page&lt;/a&gt;. They cover the same Apple Vision tuning parameters and the two-column reading-order segmentation shown above.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>swift</category>
      <category>privacy</category>
      <category>ocr</category>
    </item>
  </channel>
</rss>
