Hasty Briefsbeta

The Anatomy of a macOS App

4 days ago
  • #macOS
  • #Software Development
  • #App Bundles
  • Mac OS introduced resource forks for storing app resources separately from executable code.
  • Mac OS X adopted the bundle structure from NeXTSTEP, organizing apps into directories like Contents, MacOS, and Resources.
  • Important files in app bundles include Info.plist and PkgInfo, with Info.plist being essential for specifying app details.
  • Launching an app involves LaunchServices and RunningBoard, relying on Info.plist.
  • Code signatures were introduced in Mac OS X 10.5 Leopard, adding a _CodeSignature directory for integrity checks.
  • App Store distributed apps include a _MASReceipt directory for store receipts.
  • Notarization introduced in 2018 allows 'stapling' a ticket into the app bundle.
  • Additional directories like Library, XPCServices, Plugins, and Extensions may be included in the app bundle.
  • App bundles centralize components, improving installation, updates, removal, and security.
  • No structural difference exists between Intel and Arm architecture apps due to 'fat' binary files containing both architectures' code.