Blog Topics: macOS Development

macOS SwiftUI

  1. SwiftUI for macOS: Key differences from iOS - AppKit bridging, expectations
  2. MenuBarExtra: Building menu bar apps - Simple utilities
  3. Settings/Preferences window in SwiftUI - macOS Settings scene
  4. Window management in SwiftUI - openWindow, WindowGroup, DocumentGroup
  5. Multiple windows in macOS apps - Window state, restoration
  6. Sidebar navigation on Mac - NavigationSplitView, three-column layout
  7. NSViewRepresentable basics - Wrapping AppKit views
  8. Table view in SwiftUI (macOS) - Sortable columns, selection
  9. Keyboard shortcuts in SwiftUI - keyboardShortcut modifier
  10. Context menus for Mac - Right-click menus, menu bar commands

macOS-Specific Features

  1. Drag and drop on macOS - Files, custom types, UTTypes
  2. File dialogs: Open, save, export - fileImporter, fileExporter
  3. Dock icon customization - Badges, progress, menus
  4. Sharing services on macOS - NSSharingServicePicker
  5. Touch Bar support (legacy Macs) - Still relevant for some users
  6. Spotlight integration - Core Spotlight, indexing content
  7. Quick Look previews - QLPreviewProvider
  8. Services menu integration - NSServicesProvider
  9. AppleScript support in Swift apps - Scriptable apps
  10. Handoff between Mac and iOS - NSUserActivity

Mac App Distribution

  1. Sandboxing explained - Entitlements, capabilities
  2. Hardened runtime - Required entitlements
  3. Notarization step by step - Command line and Xcode
  4. Mac App Store vs Direct distribution - Pros/cons
  5. Distributing outside the App Store - DMG, pkg, Sparkle updates
  6. Developer ID signing - Certificates explained
  7. Universal binaries (Apple Silicon + Intel) - Build settings
  8. App Translocation issues - Why your app doesn’t work from Downloads

Mac-Specific APIs

  1. NSWorkspace: Opening files, apps, URLs - System integration
  2. FSEvents: Watching file system changes - Folder monitoring
  3. Login items: Launch at startup - SMAppService, modern API
  4. Global keyboard shortcuts - CGEvent, accessibility permissions
  5. Screen capture permissions - CGWindowList, privacy
  6. Accessibility API basics - Automating other apps (authorized use)
  7. NSAppleEventManager - Handling URL schemes on Mac

AppKit Integration

  1. When to use AppKit vs SwiftUI on Mac - Decision guide
  2. NSViewController in SwiftUI - Complex AppKit views
  3. NSWindow customization - Titlebar, toolbar, styles
  4. NSMenu for app menus - Beyond SwiftUI Commands
  5. NSSplitView behavior - Resizable panes

Mac Utilities & Tools

  1. Building a menu bar utility - Complete example
  2. System status monitoring app - CPU, memory, network
  3. File batch processing tool - macOS automation
  4. Clipboard manager basics - NSPasteboard monitoring
  5. Screenshot utility - CGWindowListCreateImage

High-Traffic macOS Searches

  1. “App is damaged and can’t be opened” - Gatekeeper fix
  2. “Not notarized” error for users - What to tell users
  3. SwiftUI app won’t appear in Dock - LSUIElement
  4. Menu bar app icon not showing - Common issues
  5. Sandboxed app can’t access files - Security-scoped bookmarks