Skip to content

error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead #108

@ryandesign

Description

@ryandesign

Building laf, as part of building Aseprite 1.3.8.1, fails when using the macOS 15.0 deployment target, which is the default when building on macOS 15:

laf/os/osx/system.mm:118:22: error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
  118 |   CGImageRef image = CGDisplayCreateImageForRect(CGMainDisplayID(),
      |                      ^

A workaround is to tell the build to use the macOS 14.0 deployment target (or earlier) by adding the flag -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 when running cmake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions