Commit 1129d6b
committed
fix(clipboard): detect macOS 15.4+ via NSProcessInfo, not respondsToSelector
The respondsToSelector: probe for -accessBehavior / -setAccessBehavior: was
returning NO on macOS Tahoe under the unsigned JVM, causing the example's
Privacy card to claim the API was unsupported even though the runtime does
expose it. Switch to [NSProcessInfo isOperatingSystemAtLeastVersion:] for the
support flag — more reliable, independent of ObjC metadata visibility. The
selector probes on get/set remain as a safety net.1 parent 60635b0 commit 1129d6b
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
348 | 353 | | |
349 | 354 | | |
350 | 355 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
0 commit comments