Native Mac Development Kit · Edition 1.0

Check the parts of your Mac app a passing build doesn't.

Build with a coding agent. Check what happens when a window closes, saves overlap, or the app leaves your Mac.

67-page guide · Agent Skill · Three worked examples

One payment. Edition updates included. 30-day refund.

For developers who know basic Swift and build native macOS apps with SwiftUI.

Cover of Native Mac Development Kit by Corey Klass, version 1.0, for SwiftUI, Xcode 27 and coding agents
The actual guide. PDF + agent-readable Markdown.

Three runnable examples

See the failure. Run the fix.

Mac-specific mistakes can survive a build and a passing test. Each example includes checks that show what actually happened.

Illustration of a closing app window connected to a separate worker that stays active

Lifecycle Lab

Close the window.
Keep the work running.

A heartbeat makes the failure visible. Compare a view-owned task with an app-owned worker.

What the example checks

A view's .task stops on close while the app stays in the Dock and menu bar. Reopening resumes the count with a new task, hiding the failure.

The fix runs with no windows, starts only once, stops on request, and prevents an old run's cleanup from clearing a new one. It distinguishes closing the main window from closing the last window, and preserves Dock and menu-bar reopening.

Recorded worker check
PASS: start idempotency, stop, rapid restart, broken view cancellation/reopen, app-owned lifetime

After “Save 5 Times”

Requested #5 · Reported saved #5 · On disk #1

File Work Lab

“Saved” doesn't mean
the newest file is on disk.

Use the slow-disk switch to overlap saves. Read the file back to catch an older save finishing last.

What the example checks

Broken savers report success for every write. The fix snapshots values on the main actor, writes off it, and orders requests with an explicit gate. Cancellation reports what stopped and what was already written; replacement leaves the old or new file intact if the app dies halfway.

A sandboxed scheme resolves, renews and re-saves security-scoped bookmarks for a user-picked folder across relaunches. Xcode 27's default MainActor isolation and approachable concurrency settings matter to where the work runs.

Recorded file checks
PASS: corrected saver - newest bytes on disk, one write at a time, increasing commits (62 orders) PASS: isolation - SafeFileWriter.write ran off the main thread when called from the main actor PASS: falsifier - without @concurrent, SafeFileWriter.write ran on the main thread
Recorded local release checks
PASS local pipeline: signed copy and extracted copy pass every check PASS ditto round trip keeps the signature

Release pipeline

Check the copy
the buyer receives.

Package the corrected Lifecycle app, extract it, then check it again. The local ad-hoc path needs no account.

What the example checks

A local ad-hoc Release build can fail two notarization requirements before identity: Hardened Runtime and get-task-allow.

The Developer ID path takes your bundle ID, team and notary keychain profile: archive, export, notarize, read the notary log, staple, package, extract, check. It stops at the first failed check. Only this path needs an Apple Developer account.

Still open: the Developer ID path is written and preflight checks pass, but it hasn't run end to end with a real Apple Developer account. The second-Mac download test isn't done. The Direct Distribution chapter records the open checks.

Inside the guide

The code, the reasoning, the checks.

67 pages. Seven chapters. The same chapters as Markdown for your agent.

Read the free lifecycle chapter
The contentsA task-by-task reference
Start with the failureThe lifecycle chapter
Follow the codeOwnership, start and stop
Break it to check itRecorded verification results

The agent's side of the kit

Give it the context
this change needs.

The native-mac-development skill routes your agent to one of seven task references. Install it next to Apple's Xcode 27 skills for general SwiftUI and Swift Testing practice.

What's included and how it was checked

In fresh sessions, Claude Code and Codex each read SKILL.md and the lifecycle reference for a lifecycle task, leaving the other references alone. That's one task and one run per agent, recorded in Setup. Other Agent Skills-compatible agents should work, but weren't checked. The guide and examples don't require an agent.

Apple's skills change with Xcode; the kit's router explicitly leaves general SwiftUI and Swift Testing to them. Starter AGENTS.md and CLAUDE.md ask the agent to name the trigger, expected behavior and verification before editing, ask before opening windows, and report the exact OS and toolchain. mcp.json registers Xcode's MCP server.

Xcode's Agent Activity panel from the setup material.

One ZIP, ready to explore.

Guide + Markdown · Skill + starter files · Three examples + check scripts

Full download contents

native-mac-development-kit-1.0.zip includes corrected and broken Xcode schemes for Lifecycle and File Work; Release scripts package Lifecycle. Each example has checks and a Verification.md recording what ran, the environment and what's untested.

Also included: README, license files, changelog, a compatibility matrix separating tested from declared versions, and a SHA-256 manifest of every file.

Verification, with boundaries

Tested isn't the same as declared.

Built and checked

macOS 27.0.1 · Apple silicon
Xcode 27.2 (27B52) · Swift 6.4.2

Debug and Release. All three examples built and checked again from a clean ZIP before release.

Not run

macOS 14 is the declared deployment target; only macOS 27 was run. No Intel run. Developer ID end-to-end and second-Mac download checks remain open.

How the guide's claims were verified

Platform claims were checked individually against Apple's and Swift's documentation, a probe, or an example check on the setup above. The guide links the source or names the record. Claims still awaiting hands-on verification are marked in their chapters. Agent setup was checked only with Claude Code and Codex.

The whole kit

Keep it beside
your next Mac project.

Read a chapter, run the example, then hand the relevant context to your coding agent.

From Corey Klass

I've built software since 1996 and build and sell native Mac apps, including Klass Personal OS. This kit comes from notes on bugs that got past builds and passing tests in my Apple projects, written for agents to catch next time.

How the kit was made

Every kit example was written fresh. I checked the notes against Apple's documentation and corrected what was wrong.

Edition 1.0 · One payment

$49 USD

Guide, skill and all three examples.

  • One tier. Everything in the ZIP.
  • Corrections and updates to this edition included.
  • MIT example code. Single-buyer guide and skill license.
  • Full refund within 30 days. No reason needed.
Read the free chapter first

Sold by Corey Klass through Klass Concepts, LLC, which processes payment and issues the receipt.

Before you buy

A few practical details.

License terms and refunds
Full license texts

Can I use the code commercially? What about my team?

Yes. The code is MIT licensed, including commercial use. Keep its copyright and permission notice with copies; an acknowledgments file works for a shipped app.

The guide and skill are licensed to the buyer. Install the skill in your own and your team's private projects for as long as you're on the team. Don't share the PDF; each reader needs a copy. For several buyers, email support@coreyklass.com first.

How do updates work?

Your receipt's order link always serves the current version of your edition. Corrections and edition updates are included. A later edition for a new toolchain may be a separate purchase; yours keeps working as it is.

Lost the email? Request your order links at the address you bought with.

What support and refund policy come with it?

Email errata and questions about the kit to support@coreyklass.com. Guide errors become corrections in an update. Debugging your app is separate: see Focused Code Review.

Ask within 30 days for a full refund. No reason needed.

Does it cover iOS?

Only the Xcode MCP chapter's agent-driven iOS Simulator loop. Everything else is macOS.