Commit 1fa4d3c
authored
Fix macOS 13 compatibility (#356)
## 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.1 parent 4a3cb13 commit 1fa4d3c
File tree
1 file changed
+1
-1
lines changed- Sources/CodeEditSourceEditor/Extensions
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
0 commit comments