Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix macOS 13 compatibility #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
0xWDG merged 1 commit into CodeEditApp:main from nekohasekai:main
Dec 31, 2025
Merged

Fix macOS 13 compatibility #356

0xWDG merged 1 commit into CodeEditApp:main from nekohasekai:main
Dec 31, 2025

Conversation

@nekohasekai
Copy link
Contributor

@nekohasekai nekohasekai commented Dec 31, 2025

Summary

  • Replace asyncAndWait with sync to fix crash on macOS 13

Problem

DispatchQueue.asyncAndWait(execute:) is only available on macOS 14+. Using #available check doesn't help because the symbol is still hard-linked in the binary, causing dyld to crash at launch on older systems:

Symbol not found: _$sSo17OS_dispatch_queueC8DispatchE12asyncAndWait7executexxyKXE_tKlF
Expected in: /usr/lib/swift/libswiftDispatch.dylib

Solution

Use DispatchQueue.main.sync(execute:) instead, which has equivalent behavior and is available on all macOS versions.

Remove asyncAndWait which is unavailable on macOS < 14. Using sync instead, which has equivalent behavior.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a crash on macOS 13 by replacing an API that's only available on macOS 14+ with a backward-compatible equivalent. The issue was that asyncAndWait caused dyld to crash at launch on macOS 13 due to hard-linking of unavailable symbols, even when guarded with availability checks.

Key Changes:

  • Replace DispatchQueue.main.asyncAndWait(execute:) with DispatchQueue.main.sync(execute:) which has identical behavior and is available on macOS 13+

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@0xWDG 0xWDG marked this pull request as ready for review December 31, 2025 09:52
@0xWDG 0xWDG merged commit 1fa4d3c into CodeEditApp:main Dec 31, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@0xWDG 0xWDG 0xWDG approved these changes

@thecoolwinter thecoolwinter Awaiting requested review from thecoolwinter

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /