Friday, February 23, 2024

Swift Scripts Importing Cocoa Frameworks Broken on macOS 14

Jesse Squires:

On macOS 14 Sonoma there is a regression in Swift 5.9 which causes Swift scripts that import Cocoa frameworks to fail.


The current workaround (also posted by @rdj) is to update the shebang, #!/usr/bin/swift, by replacing it with the following:

#!/usr/bin/env DYLD_FRAMEWORK_PATH=/System/Library/Frameworks /Applications/


Comments RSS · Twitter · Mastodon

Leave a Comment