Ehsan Azish (@ehzish) header
Ehsan Azish (@ehzish) profile picture

Indie Apple developer shipping unusual, useful software. SwiftUI, on-device AI, privacy & security. Building @3Nsofts in public.

Joined December 2023
Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)Photo by Ehsan Azish (@ehzish)
Copying a password from your Mac app can leave it in clipboard-manager history. Add `org.nspasteboard.ConcealedType` when writing it so supporting managers skip history. Then clear it after ~60s—but only if `changeCount` still matches, or you may erase the user’s next copy.
🤖 Made with AI
5
3
59
Notarized doesn’t automatically mean offline-ready. Without a stapled ticket, Gatekeeper may need to contact Apple when the app is first opened. After notarization: xcrun stapler staple MyApp.app Don’t staple only the DMG. Staple the .app before packaging it, then staple the finished DMG too. That way, the app users drag out retains its own ticket.
🤖 Made with AI
2
53
Good default for utilities. If the app also has a MenuBarExtra or background work, don't let the scene type decide. Answer `applicationShouldTerminateAfterLastWindowClosed(_:)` explicitly, then test close, quit and relaunch. nitter.gq/caguilar51/status/2128…
On macOS, a SwiftUI app built on WindowGroup keeps running after its last window closes. If your app really is one window, like a utility, make the main scene a Window instead. Close it and the app quits, and openWindow(id:) brings it to the front instead of opening a copy.
2
61
Your SwiftUI colors are not finished when Light Mode looks right. They still have to survive Dark Mode, increased contrast, transparency, grayscale—and real content. Here are 8 mistakes I check before shipping:
1
42
A file URL is not permission in a sandboxed Mac app. For a user-picked file you need after relaunch, save bookmarkData(options: .withSecurityScope)—not just the URL. On restore, resolve with the same scope, replace stale bookmark data, and pair every successful startAccessingSecurityScopedResource() with stopAccessingSecurityScopedResource(). defer keeps that last pair honest.
2
2
71
nice trick, with one trap: write `try await Task.sleep(for: .milliseconds(300))`, not `try?`. `try?` swallows the cancellation, so every keystroke still fires its request. Check `Task.isCancelled` before assigning results too. nitter.gq/caguilar51/status/2127…
In SwiftUI, .task(id: query) cancels the running task and starts a new one every time query changes. Put a short Task.sleep at the top and you get search debouncing for free, because the sleep throws as soon as the next keystroke cancels it.
29
One Swift tool can now live in two places: inside a LanguageModelSession and behind an MCP server. Swift MCP SDK PR #398 bridges FoundationModels.Tool ↔ MCP.Tool, deriving schemas from @Generable types instead of maintaining a second handwritten contract. It also supports an approval callback before a wrapped MCP tool is called. The real win is not just less glue. On-device AI and external MCP clients can share one tool contract without the two implementations quietly drifting apart. Merged into the 1.0.0 release branch: github.com/modelcontextproto…
2
2
80
macOS has two keychain implementations, and SecItem defaults to the legacy file-based one in a normal macOS app. To target the iOS-style data-protection keychain, add: kSecUseDataProtectionKeychain: true Put it on every SecItem query—not only SecItemAdd, but copy, update, and delete too. Otherwise later operations may target the wrong keychain and fail to find the item you stored.
1
3
97
SwiftUI can hide a secret without hiding its label. Mark only the value with `.privacySensitive()`, then apply `.redacted(reason: .privacy)` higher up. Redaction changes appearance, not behavior. A redacted button may still work, so disable the action separately.
3
7
259
Before I trust a Mac app outside the App Store, I separate four checks: file hash, Developer ID signature, notarization, and a stapled ticket. None proves the app is harmless. Together they make the first-launch decision much easier to inspect.
2
1
120
I wanted dictation on my Mac that never sends my voice anywhere. So I built Lokal: free, on-device, and nothing leaves your Mac. If you've ever hesitated before dictating something private, this is for that.
38
1/ App Store review is usually manageable. The stressful part is a mismatch between what I think I submitted and what the build actually does.
1
62
2/ Now I check three things against the exact archive I upload: entitlements, privacy usage strings, and a clean install with no iCloud account signed in.
1
35
3/ That last one catches the most. If a sync app assumes iCloud is there, it can look broken on a reviewer's fresh device. Treat "no account" and "iCloud off" as real states.
12
Practical side of this: a file that imports MapKit but not SwiftUI can't see `Map`. In modular apps, an umbrella import can hide that until one target drops it. Import both where the view actually lives. nitter.gq/sarunw/status/21259678…
Importing SwiftUI and MapKit also loads their cross-import overlay, _MapKit_SwiftUI. That’s where Map lives.
2
3
148
Indie Apple developer building 3Nsofts in public. Shipping native SwiftUI, macOS, and on-device AI apps. If you build for Apple platforms or love sharp Mac apps, let's connect.
40
32
904
iOS 26 tip: `.labelReservedIconWidth()` keeps Label icons on a fixed column, even when the symbols differ in size. Still test it at accessibility sizes and with localized multiline labels. The icons can stay aligned while the text is what breaks.
2
81
A Mac app does not become “background-safe” just because it has no Dock icon. For menu bar apps, I test quit and relaunch, login-item state, crash recovery, and whether the helper process actually exits. The missing window is the easy part.
1
60
Before I test a Mac app’s first launch, I reset the state it can inherit: its container, preferences, Keychain entries and privacy permissions. Otherwise the “new user” flow may be carrying months of developer state. That is an upgrade test wearing an onboarding costume.
44
A keyboard shortcut earns its place when it saves a repeated trip through the UI. Start with the action someone repeats all day, not the one that looks good in a shortcut cheat sheet.
1
32