Home Blog How macOS exposes MacBook notch safe areas

How macOS exposes MacBook notch safe areas

MacBook display scaling makes a single pixel table easy to misuse. AppKit exposes the usable screen area and the top-corner regions; query those values on the target screen instead of assuming one physical notch width fits every mode.

What the safe-area APIs describe

NSScreen.safeAreaInsets describes distances from the display edges where content would be obscured. Apple notes that, on some Macs, the top inset reflects the camera housing. auxiliaryTopLeftArea and auxiliaryTopRightArea describe unobscured regions around that top area. These are useful layout coordinates; they are not a specification of the physical camera cutout’s manufacturing dimensions. See Apple’s safe-area documentation and the NSScreen reference.

Inspect the screen used by your app

For a macOS diagnostic, log the selected NSScreen’s frame, safeAreaInsets, and optional auxiliary-area widths. Keep the values in points and record the active display scaling setting. Convert a rectangle to backing pixels only when a pixel-space comparison is actually needed; do not label that conversion as the plastic or glass notch size.

if let screen = NSScreen.main {
    let left = screen.auxiliaryTopLeftArea?.width ?? 0
    let right = screen.auxiliaryTopRightArea?.width ?? 0
    print("frame:", screen.frame)
    print("safe area:", screen.safeAreaInsets)
    print("top auxiliary widths:", left, right)
}

How NotchDock uses these values

In the reviewed source, NotchDock reads NSScreen.main, derives a center width from the screen frame and the two auxiliary widths, and uses the top safe-area inset for its menu-bar height. If no notch areas are reported, it uses a configured fallback width. That approach does not justify a fixed 14-inch or 16-inch physical dimension table, and this page does not publish one.

When comparing a display, record the Mac model, macOS version, resolution/scaling choice, and the queried screen values together. A change in logical points is not itself a change in the physical cutout.