Jump to content

Audio Switcher (Swiftly switch audio output and input devices)


Recommended Posts

Posted (edited)

Hi folks, I built something today using Alfreds new Workflow Builder. Maybe you find it useful.

 

Why this Workflow?

I find myself frequently switching between audio output and input devices. Existing solutions either are slow, take to many interactions or need third-party tools.

Therefore, this workflow offers a couple of features to make switching audio devices easier and faster.

 

It also allows filtering out devices you do not want to see in the suggestions.

image.png.412a3b39826011d378d124ec0f4b432c.png

 

In order to make it even faster, the workflow provides Hotkeys and Remote Triggers for up to three input and up to three output devices and comes with its own Remote page.

image.thumb.png.f9ec5ef7472e369bb1636ca6b7432c1a.png

 

The workflow is of course configurable. 😁

image.thumb.png.b1646300cda86fdd4c6be7559b8bde86.png

 

 

Some technical goodies:

This workflow does not need any third-party tools such as `SwitchAudioSource` or `jq`. It relies fully on Swift and ZSH, which should both be available in modern OS X Versions. Furthermore, as it does not contain binaries, code signing isn't an issue.

 

 

Inspired by:

 

I am looking forward for your thoughts and feedback! 🙏

Edited by TobiasMende
  • 1 month later...
Posted

Really eager to use this workflow as I switch audio sources often.

 

Just installed this with the latest MacOS on an M1 MacBook Pro, but it does not show up.  Thanks for any help.

I get this in the bug report:

 

Quote

[08:23:56.729] Logging Started...
[08:24:00.372] Audio Switcher[Script Filter] Queuing argument '(null)'
[08:24:00.499] Audio Switcher[Script Filter] Script with argv '(null)' finished
[08:24:00.508] ERROR: Audio Switcher[Script Filter] Code 1: <unknown>:0: error: unable to load standard library for target 'arm64-apple-macosx14.0'
[08:24:18.015] Audio Switcher[Script Filter] Queuing argument '(null)'
[08:24:18.244] Audio Switcher[Script Filter] Script with argv '(null)' finished
[08:24:18.251] ERROR: Audio Switcher[Script Filter] Code 1: <unknown>:0: error: unable to load standard library for target 'arm64-apple-macosx14.0'

 

Posted

@TobiasMende This is fantastic, and almost exactly what I have been looking for. One thing that would make it absolutely perfect for me would be if there were an option to toggle among favorites with a single hotkey. For example: I most often want to just switch between just my headphones and display speakers, so I had set up (using a Keyboard Maestro macro) so that one button would switch just between those two: if I am currently set to headphones, it switches to the display speakers and vice versa.

 

Do you think that is something you might be able to add?

Posted
12 hours ago, JAShapiro said:

@TobiasMende This is fantastic, and almost exactly what I have been looking for. One thing that would make it absolutely perfect for me would be if there were an option to toggle among favorites with a single hotkey. For example: I most often want to just switch between just my headphones and display speakers, so I had set up (using a Keyboard Maestro macro) so that one button would switch just between those two: if I am currently set to headphones, it switches to the display speakers and vice versa.

 

Do you think that is something you might be able to add?

Thank you for this idea! I like the idea of being able to quickly toggle between two devices. 
I will check your PR and get back on GitHub 🙂

Posted
On 2/6/2024 at 8:26 AM, milopus said:

Really eager to use this workflow as I switch audio sources often.

 

Just installed this with the latest MacOS on an M1 MacBook Pro, but it does not show up.  Thanks for any help.

I get this in the bug report:

 

 

Sorry for the delayed response.
This sounds like your Mac has problems executing the Swift script.

Have you installed the Workflow from the Gallery (https://alfred.app/workflows/tobiasmende/audio-switcher/) or from the forum?

I thought the requirements are pre-installed in the modern Mac versions, but maybe some requirement is missing. This might be solved by running `xcode-select --install` on the command line.

  • 2 weeks later...
  • 9 months later...
Posted

Dear Tobia, thanks for creating this workflow. I'm using the latest M4 Pro mac, and xcode-select --install is confirmed installed. I've installed your workflow from the Gallery, when I use the keywords, it shows up but there's a line says Please wait, and when I press enter, nothing happens, if I wait for a while, Audio Outputs will just disappear.

CleanShot 2024-11-23 at 11.27.31.png

Posted

Thank you Stephen for the note.

My MacOS: Sequoia 15.1.1.

Alfred: 5.5.1

Workflow installed from Gallery.

 

Here's my debug info:

 

[14:32:16.096] Audio Switcher[Script Filter] Queuing argument '(null)'
[14:32:19.115] Audio Switcher[Script Filter] Script with argv '(null)' finished
[14:32:19.121] ERROR: Audio Switcher[Script Filter] Code 1: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- error: redefinition of module 'SwiftBridging'
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- note: previously defined here
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
    3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name "\"FoundationPreview\""
    4 | import Combine
    5 | import CoreFoundation
      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
    6 | import Darwin
    7 | import Dispatch

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:
/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:
main.swift:2:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
  1 | #!/usr/bin/swift
  2 | import Foundation
    |        `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
  3 | import CoreAudio
  4 | 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- error: redefinition of module 'SwiftBridging'
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- note: previously defined here
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- error: redefinition of module 'SwiftBridging'
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- note: previously defined here
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- error: redefinition of module 'SwiftBridging'
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- note: previously defined here
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:
 11 | #define CATapDescription_h
 12 | 
 13 | #import <Foundation/NSString.h>
    |         `- note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:
 14 | #import <Foundation/NSArray.h>
 15 | #import <Foundation/NSUUID.h>

<module-includes>:1:9: note: in file included from <module-includes>:1:
1 | #import "Headers/Foundation.h"
  |         `- note: in file included from <module-includes>:1:
2 | #import "Headers/NSDebug.h"
3 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:9: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:
 93 | #import <Foundation/NSURLCredential.h>
 94 | #import <Foundation/NSURLCredentialStorage.h>
 95 | #import <Foundation/NSURLError.h>
    |         `- note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:
 96 | #import <Foundation/NSURLProtectionSpace.h>
 97 | #import <Foundation/NSURLProtocol.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:9: error: could not build module 'CoreServices'
 13 | #endif
 14 | #else
 15 | #import <CoreServices/CoreServices.h>
    |         `- error: could not build module 'CoreServices'
 16 | #endif
 17 | 

<module-includes>:6:9: note: in file included from <module-includes>:6:
4 | #import "Headers/AudioHardwareBase.h"
5 | #import "Headers/AudioHardwareTapping.h"
6 | #import "Headers/CATapDescription.h"
  |         `- note: in file included from <module-includes>:6:
7 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: error: could not build module 'Foundation'
 11 | #define CATapDescription_h
 12 | 
 13 | #import <Foundation/NSString.h>
    |         `- error: could not build module 'Foundation'
 14 | #import <Foundation/NSArray.h>
 15 | #import <Foundation/NSUUID.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/swift/CoreAudio.swiftmodule/arm64e-apple-macos.swiftinterface: 0:
/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- error: redefinition of module 'SwiftBridging'
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 | 
13 | module SwiftBridging {
   |        `- note: previously defined here
14 |     header "bridging"
15 | 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
    3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name "\"FoundationPreview\""
    4 | import Combine
    5 | import CoreFoundation
      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
    6 | import Darwin
    7 | import Dispatch

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:
/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

Posted

Loving the switcher!

Two things, one issue, and one request. I'll make it worth your time, so please share where I can support you or buy you a few cups of coffee! 😉

 

1. Issue - Fetching audio inputs gets them all, but they do not all show when typing "in" (see images with red captions).

 

Here is fetch debug showing my inputs (none have which been ignored... yet):
[16:00:59.462] Audio Switcher

  1. Processing complete
    [16:00:59.466] Audio Switcher
    1. Passing output 'input' to Run Script
      [16:00:59.847] Audio Switcher[Run Script] Processing complete
      [16:00:59.852] Audio Switcher[Run Script] Passing output 'USB AUDIO  CODEC
      CalDigit Thunderbolt 3 Audio
      MacBook Pro Microphone
      Sennheiser
      ' to Copy to Clipboard
      [16:00:59.853] Audio Switcher[Copy to Clipboard] Processing complete
      [16:00:59.854] Audio Switcher[Copy to Clipboard] Passing output 'USB AUDIO  CODEC
      CalDigit Thunderbolt 3 Audio
      MacBook Pro Microphone
      Sennheiser
      ' to Post Notification

 

I have not ignored any of these, but when I use the filter "in" it only shows that I can select the MacBook Pro Microphone. Image attached. Here is the debug after typing "in":

[16:02:57.591] Audio Switcher[Script Filter] Queuing argument '(null)'
[16:02:57.949] Audio Switcher[Script Filter] Script with argv '(null)' finished
[16:02:57.953] Audio Switcher[Script Filter] {"items": [{"title": "USB AUDIO  CODEC", "uid": "USB AUDIO  CODEC", "autocomplete": "USB AUDIO  CODEC", "arg": "58", "icon": {"path": "./icons/input.png"}},{"title": "CalDigit Thunderbolt 3 Audio", "uid": "CalDigit Thunderbolt 3 Audio", "autocomplete": "CalDigit Thunderbolt 3 Audio", "arg": "49", "icon": {"path": "./icons/input.png"}},{"title": "MacBook Pro Microphone", "uid": "MacBook Pro Microphone", "autocomplete": "MacBook Pro Microphone", "arg": "178", "icon": {"path": "./icons/input.png"}},{"title": "Sennheiser", "uid": "Sennheiser", "autocomplete": "Sennheiser", "arg": "183", "icon": {"path": "./icons/input_selected.png"}}]}

 

2. Request - When switching output, is there a way to move output as well as alerts and sound effects (see image with green caption).

 

Thank you sir! 

 


 

 

SCR-20241124-oenb.png

SCR-20241124-oehh.png

SCR-20241124-ofpv.png

Posted
On 11/23/2024 at 2:30 PM, finddarkpoet said:

@vitor Hi, I haven't installed any Xcode, but only installed the Xcode Command Line Tools. 

xcode-select version 2409

 

Appreciated your reply!

 

Hi @finddarkpoet, this is a Mac OS bug.  This answer might help you solving it: https://github.com/orgs/Homebrew/discussions/5723#discussioncomment-11185411

See also the bug report on my GitHub: https://github.com/TobiasMende/alfred-audio-switcher/issues/8

Posted

 Hi @BCraftMath, glad to hear you enjoy my workflow. 😊

Thank you for supplying such a detailed description.

On 11/24/2024 at 10:14 PM, BCraftMath said:

1. Issue - Fetching audio inputs gets them all, but they do not all show when typing "in" (see images with red captions).

 

Let's see what we can do here. This looks strange, indeed, as the JSON returned when you use the "in" command contains 4 input sources and Alfred should normally show them. – What happens if you type a space after the "in"? – At the moment, I assume it is more an issue with Alfred or a setting, as the workflow returns the correct input sources. 🤔

 

On 11/24/2024 at 10:14 PM, BCraftMath said:

2. Request - When switching output, is there a way to move output as well as alerts and sound effects (see image with green caption).

I think that would be possible. Unfortunately, it seems not to be possible to detect if the Sound Effects setting is set to "Selected Sound Output Device", so I think I will have to go with a new setting in the Workflow config. But I will give it a try. 🙂

CleanShot 2024-11-29 at 13.18.30@2x.png

Posted

@TobiasMende Man... I need to fill out the ID10T form! The space after "in" does show the inputs! Thank you for that simple recommendation! And YES... the checkbox to move sound output and sounds effects together works flawlessly. Just purchased you a few coffees man! Thank you so much!

Posted

Hi @TobiasMende,

Thanks for the reply. I've followed the instruction by removing the current CTL and reinstalled 16.2 by downloading the dmg file, I still get the same error, please advise:

[17:47:52.625] Audio Switcher[Script Filter] Queuing argument '(null)'
[17:47:55.527] Audio Switcher[Script Filter] Script with argv '(null)' finished
[17:47:55.532] ERROR: Audio Switcher[Script Filter] Code 1: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- error: redefinition of module 'SwiftBridging'
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- note: previously defined here
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name ""FoundationPreview""
4 | import Combine
5 | import CoreFoundation
| `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
6 | import Darwin
7 | import Dispatch

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:
/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:
main.swift:2:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
1 | #!/usr/bin/swift
2 | import Foundation
| `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
3 | import CoreAudio
4 |

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- error: redefinition of module 'SwiftBridging'
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- note: previously defined here
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- error: redefinition of module 'SwiftBridging'
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- note: previously defined here
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- error: redefinition of module 'SwiftBridging'
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- note: previously defined here
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:
11 | #define CATapDescription_h
12 |
13 | #import <Foundation/NSString.h>
| `- note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:
14 | #import <Foundation/NSArray.h>
15 | #import <Foundation/NSUUID.h>

:1:9: note: in file included from :1:
1 | #import "Headers/Foundation.h"
| `- note: in file included from :1:
2 | #import "Headers/NSDebug.h"
3 |

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:9: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:
93 | #import <Foundation/NSURLCredential.h>
94 | #import <Foundation/NSURLCredentialStorage.h>
95 | #import <Foundation/NSURLError.h>
| `- note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:
96 | #import <Foundation/NSURLProtectionSpace.h>
97 | #import <Foundation/NSURLProtocol.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:9: error: could not build module 'CoreServices'
13 | #endif
14 | #else
15 | #import <CoreServices/CoreServices.h>
| `- error: could not build module 'CoreServices'
16 | #endif
17 |

:6:9: note: in file included from :6:
4 | #import "Headers/AudioHardwareBase.h"
5 | #import "Headers/AudioHardwareTapping.h"
6 | #import "Headers/CATapDescription.h"
| `- note: in file included from :6:
7 |

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: error: could not build module 'Foundation'
11 | #define CATapDescription_h
12 |
13 | #import <Foundation/NSString.h>
| `- error: could not build module 'Foundation'
14 | #import <Foundation/NSArray.h>
15 | #import <Foundation/NSUUID.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/swift/CoreAudio.swiftmodule/arm64e-apple-macos.swiftinterface: 0:
/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- error: redefinition of module 'SwiftBridging'
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here
11 | //===----------------------------------------------------------------------===//
12 |
13 | module SwiftBridging {
| `- note: previously defined here
14 | header "bridging"
15 |

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name ""FoundationPreview""
4 | import Combine
5 | import CoreFoundation
| `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.
6 | import Darwin
7 | import Dispatch

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:
/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

Posted

Hi @finddarkpoet, hmm. Good question, I am not that deep into the Swift ecosystem. Are you using Homebrew? If so, maybe a `brew upgrade` helps? Also in that case, `brew doctor` might point to something? Sorry, just guessing around, as I (un)fortunately do not have this problem myself.

 

Let me know if that brought you closer to a solution. 🙂

  • 1 month later...
Posted (edited)

Apologies to all but I new to Alfred (as in brand new).

 

I installed this Workflow and when trying to use the Workflow received a message as attached.

 

Would someone be so kind as to :

 

i) Explain what Developer Tools are needed (i.e.,, I do know that Swift is a coding language).

 

ii) Where the Developer Tools are installed on my hard drive?

 

 

In addition, I cannot seem to get this to work in that I do execute the Alfred Fetchaudiodevices and then when I type "in" or "out" I get a message "Audio inputs / outputs, please wait" and the other times out without ever displaying the Audio Inputs and Audio Outputs that I entered.

 

Thank you.

 

Joel

 

Screenshot 2025-01-03 at 4.59.09 PM.png

Edited by JoelC
Posted

Although @vitor was kind enough to answer my first question,  I cannot seem to get this Workflow to work!

 

I executed the Alfred Fetchaudiodevices and copied both the In and the Out.

 

When I now type "in" or "out" I get a message "Audio inputs / outputs, please wait" and the Workflow then times out without ever displaying the Audio Inputs and Audio Outputs that I entered.

 

Please assist.

 

Joel

Posted

@vitor apologies, so much to learn and read.  I thought I had done so by asking within this thread but apparently there is far more.

 

That said, the debugger log is as follows:

 

[18:58:37.925] Logging Started...

[18:58:43.231] Audio Switcher[Script Filter] Queuing argument '(null)'

[18:58:46.002] Audio Switcher[Script Filter] Script with argv '(null)' finished

[18:58:46.004] ERROR: Audio Switcher[Script Filter] Code 1: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    3 | // swift-module-flags: -target arm64e-apple-macos15.2 -target-variant arm64e-apple-ios18.2-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3208 -module-name Foundation -package-name "\"FoundationPreview\""

    4 | import Combine

    5 | import CoreFoundation

      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    6 | import Darwin

    7 | import Dispatch

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

main.swift:2:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

  1 | #!/usr/bin/swift

  2 | import Foundation

    |        `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

  3 | import CoreAudio

  4 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:

11 | #define CATapDescription_h

12 |

13 | #import <Foundation/NSString.h>

    |         `- note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:

14 | #import <Foundation/NSArray.h>

15 | #import <Foundation/NSUUID.h>

 

<module-includes>:1:9: note: in file included from <module-includes>:1:

1 | #import "Headers/Foundation.h"

  |         `- note: in file included from <module-includes>:1:

2 | #import "Headers/NSDebug.h"

3 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:9: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:

92 | #import <Foundation/NSURLCredential.h>

93 | #import <Foundation/NSURLCredentialStorage.h>

94 | #import <Foundation/NSURLError.h>

    |         `- note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:

95 | #import <Foundation/NSURLProtectionSpace.h>

96 | #import <Foundation/NSURLProtocol.h>

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:9: error: could not build module 'CoreServices'

13 | #endif

14 | #else

15 | #import <CoreServices/CoreServices.h>

    |         `- error: could not build module 'CoreServices'

16 | #endif

17 |

 

<module-includes>:6:9: note: in file included from <module-includes>:6:

4 | #import "Headers/AudioHardwareBase.h"

5 | #import "Headers/AudioHardwareTapping.h"

6 | #import "Headers/CATapDescription.h"

  |         `- note: in file included from <module-includes>:6:

7 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: error: could not build module 'Foundation'

11 | #define CATapDescription_h

12 |

13 | #import <Foundation/NSString.h>

    |         `- error: could not build module 'Foundation'

14 | #import <Foundation/NSArray.h>

15 | #import <Foundation/NSUUID.h>

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/swift/CoreAudio.swiftmodule/arm64e-apple-macos.swiftinterface: 0:

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    3 | // swift-module-flags: -target arm64e-apple-macos15.2 -target-variant arm64e-apple-ios18.2-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3208 -module-name Foundation -package-name "\"FoundationPreview\""

    4 | import Combine

    5 | import CoreFoundation

      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    6 | import Darwin

    7 | import Dispatch

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

[18:58:53.973] Audio Switcher[Script Filter] Queuing argument '(null)'

[18:58:56.744] Audio Switcher[Script Filter] Script with argv '(null)' finished

[18:58:56.748] ERROR: Audio Switcher[Script Filter] Code 1: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    3 | // swift-module-flags: -target arm64e-apple-macos15.2 -target-variant arm64e-apple-ios18.2-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3208 -module-name Foundation -package-name "\"FoundationPreview\""

    4 | import Combine

    5 | import CoreFoundation

      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    6 | import Darwin

    7 | import Dispatch

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

main.swift:2:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

  1 | #!/usr/bin/swift

  2 | import Foundation

    |        `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

  3 | import CoreAudio

  4 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:

11 | #define CATapDescription_h

12 |

13 | #import <Foundation/NSString.h>

    |         `- note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:

14 | #import <Foundation/NSArray.h>

15 | #import <Foundation/NSUUID.h>

 

<module-includes>:1:9: note: in file included from <module-includes>:1:

1 | #import "Headers/Foundation.h"

  |         `- note: in file included from <module-includes>:1:

2 | #import "Headers/NSDebug.h"

3 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:9: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:

92 | #import <Foundation/NSURLCredential.h>

93 | #import <Foundation/NSURLCredentialStorage.h>

94 | #import <Foundation/NSURLError.h>

    |         `- note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:94:

95 | #import <Foundation/NSURLProtectionSpace.h>

96 | #import <Foundation/NSURLProtocol.h>

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:9: error: could not build module 'CoreServices'

13 | #endif

14 | #else

15 | #import <CoreServices/CoreServices.h>

    |         `- error: could not build module 'CoreServices'

16 | #endif

17 |

 

<module-includes>:6:9: note: in file included from <module-includes>:6:

4 | #import "Headers/AudioHardwareBase.h"

5 | #import "Headers/AudioHardwareTapping.h"

6 | #import "Headers/CATapDescription.h"

  |         `- note: in file included from <module-includes>:6:

7 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: error: could not build module 'Foundation'

11 | #define CATapDescription_h

12 |

13 | #import <Foundation/NSString.h>

    |         `- error: could not build module 'Foundation'

14 | #import <Foundation/NSArray.h>

15 | #import <Foundation/NSUUID.h>

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/swift/CoreAudio.swiftmodule/arm64e-apple-macos.swiftinterface: 0:

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging'

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- error: redefinition of module 'SwiftBridging'

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here

11 | //===----------------------------------------------------------------------===//

12 |

13 | module SwiftBridging {

   |        `- note: previously defined here

14 |     header "bridging"

15 |

 

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    3 | // swift-module-flags: -target arm64e-apple-macos15.2 -target-variant arm64e-apple-ios18.2-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3208 -module-name Foundation -package-name "\"FoundationPreview\""

    4 | import Combine

    5 | import CoreFoundation

      |        `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.5 clang-1600.0.30.1)', while this compiler is 'Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)'). Please select a toolchain which matches the SDK.

    6 | import Darwin

    7 | import Dispatch

 

/Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0:

/Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:

[18:59:01.405] Logging Stopped.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...