aseprite / aseprite/laf

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

Open
#108 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
349
Forks
97
Avg merge
4d 7h
Merged PRs (30d)
2

Description

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`.

Contributor guide

Open the contributing guide

Research direction

Start in laf/os/osx/system.mm at line 118 and inspect the CGDisplayCreateImageForRect call and its surrounding screen-capture path. Build laf with the macOS 15.0 deployment target to reproduce the failure; done means the macOS 15 build succeeds using the requested ScreenCaptureKit replacement rather than the obsolete API.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.