Build Information
Failed to build WWNormalizeAudioPlayer, reference main (11944e), with Swift 6.3 for macOS (SPM) on 28 Jul 2026 05:08:42 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: undefined version: run 'make version' to update
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/William-Weng/WWNormalizeAudioPlayer.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/William-Weng/WWNormalizeAudioPlayer
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 11944e2 - 簡化播放功能 (去除Loop / Random) - 加強準備設定時,直接能取得音訊名及時間長度
Cloned https://github.com/William-Weng/WWNormalizeAudioPlayer.git
Revision (git rev-parse @):
11944e25e883b639c6a123118adca7947b63c2a3
SUCCESS checkout https://github.com/William-Weng/WWNormalizeAudioPlayer.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"traits": [
"default"
],
"dependencies": [
{
"identity": "wwnormalizeaudioplayer",
"name": "WWNormalizeAudioPlayer",
"url": "https://github.com/William-Weng/WWNormalizeAudioPlayer.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/WWNormalizeAudioPlayer",
"traits": [
"default"
],
"dependencies": [
]
}
]
}
Fetching https://github.com/William-Weng/WWNormalizeAudioPlayer.git
[1/536] Fetching wwnormalizeaudioplayer
Fetched https://github.com/William-Weng/WWNormalizeAudioPlayer.git from cache (1.15s)
Creating working copy for https://github.com/William-Weng/WWNormalizeAudioPlayer.git
Working copy of https://github.com/William-Weng/WWNormalizeAudioPlayer.git resolved at main (11944e2)
warning: '.resolve-product-dependencies': dependency 'wwnormalizeaudioplayer' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.3
Building package at path: $PWD
https://github.com/William-Weng/WWNormalizeAudioPlayer.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--6988338F2F200930.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] Compiling WWNormalizeAudioPlayer Equalizer.swift
[4/10] Compiling WWNormalizeAudioPlayer SpectrumAnalyzer.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/Tools/SpectrumAnalyzer.swift:147:51: warning: cannot use inout expression here; argument 'realp' must be a pointer that outlives the call to 'init(realp:imagp:)' [#TemporaryPointers]
145 | var real = [Float](repeating: 0, count: halfSize)
146 | var imag = [Float](repeating: 0, count: halfSize)
147 | var splitComplex = DSPSplitComplex(realp: &real, imagp: &imag)
| |- warning: cannot use inout expression here; argument 'realp' must be a pointer that outlives the call to 'init(realp:imagp:)' [#TemporaryPointers]
| |- note: implicit argument conversion from '[Float]' to 'UnsafeMutablePointer<Float>' produces a pointer valid only for the duration of the call to 'init(realp:imagp:)'
| `- note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
148 |
149 | samples.withUnsafeBufferPointer { pointer in
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/Tools/SpectrumAnalyzer.swift:147:65: warning: cannot use inout expression here; argument 'imagp' must be a pointer that outlives the call to 'init(realp:imagp:)' [#TemporaryPointers]
145 | var real = [Float](repeating: 0, count: halfSize)
146 | var imag = [Float](repeating: 0, count: halfSize)
147 | var splitComplex = DSPSplitComplex(realp: &real, imagp: &imag)
| |- warning: cannot use inout expression here; argument 'imagp' must be a pointer that outlives the call to 'init(realp:imagp:)' [#TemporaryPointers]
| |- note: implicit argument conversion from '[Float]' to 'UnsafeMutablePointer<Float>' produces a pointer valid only for the duration of the call to 'init(realp:imagp:)'
| `- note: use the 'withUnsafeMutableBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
148 |
149 | samples.withUnsafeBufferPointer { pointer in
[#TemporaryPointers]: <https://docs.swift.org/compiler/documentation/diagnostics/temporary-pointers>
[5/10] Compiling WWNormalizeAudioPlayer Protocol.swift
[6/10] Compiling WWNormalizeAudioPlayer Model.swift
[7/10] Emitting module WWNormalizeAudioPlayer
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:19:42: error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
17 |
18 | private var audioURLs: [URL] = []
19 | private var preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5)
| `- error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
20 | private var audioFile: AVAudioFile?
21 | private var audioEngine: AVAudioEngine?
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:19:62: error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
17 |
18 | private var audioURLs: [URL] = []
19 | private var preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5)
| `- error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
20 | private var audioFile: AVAudioFile?
21 | private var audioEngine: AVAudioEngine?
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:27:35: error: 'CADisplayLink' is only available in macOS 14.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
25 | private var playbackState: PlaybackState = .idle
26 |
27 | private weak var displayLink: CADisplayLink?
| `- error: 'CADisplayLink' is only available in macOS 14.0 or newer
28 |
29 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:82: error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
51 |
52 | // MARK: - 公開函式
53 | public extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
54 |
55 | /// 設定代理與更新頻率,並初始化音訊引擎
:
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| | `- error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
| `- note: add '@available' attribute to enclosing instance method
63 |
64 | self.delegate = delegate
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:155: error: 'AVAudioSession' is unavailable in macOS
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| `- error: 'AVAudioSession' is unavailable in macOS
63 |
64 | self.delegate = delegate
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h:29:12: note: 'AVAudioSession' has been explicitly marked unavailable here
27 | NS_SWIFT_SENDABLE
28 | API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
29 | @interface AVAudioSession : NSObject {
| `- note: 'AVAudioSession' has been explicitly marked unavailable here
30 | @private
31 | void *_impl;
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:102: error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
51 |
52 | // MARK: - 公開函式
53 | public extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
54 |
55 | /// 設定代理與更新頻率,並初始化音訊引擎
:
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| | `- error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
| `- note: add '@available' attribute to enclosing instance method
63 |
64 | self.delegate = delegate
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:143:40: error: 'CADisplayLink' is only available in macOS 14.0 or newer
135 |
136 | // MARK: - @objc
137 | @objc private extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
138 |
139 | /// 更新播放進度時間
:
141 | /// - Note: 此方法通常用於定期刷新目前播放時間並通知 delegate
142 | @MainActor
143 | func updatePlayTime(_ displayLink: CADisplayLink) {
| | `- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add '@available' attribute to enclosing instance method
144 |
145 | do {
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:160:35: error: 'AVAudioSession' is unavailable in macOS
158 | /// 初始化音樂引擎
159 | /// - Parameter options: AVAudioSession.CategoryOptions
160 | func initAudioEngine(options: AVAudioSession.CategoryOptions) throws {
| `- error: 'AVAudioSession' is unavailable in macOS
161 |
162 | let audioSession = AVAudioSession.sharedInstance()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h:29:12: note: 'AVAudioSession' has been explicitly marked unavailable here
27 | NS_SWIFT_SENDABLE
28 | API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
29 | @interface AVAudioSession : NSObject {
| `- note: 'AVAudioSession' has been explicitly marked unavailable here
30 | @private
31 | void *_impl;
[8/10] Compiling WWNormalizeAudioPlayer Extension.swift
[9/10] Compiling WWNormalizeAudioPlayer Constant.swift
[10/10] Compiling WWNormalizeAudioPlayer WWNormalizeAudioPlayer.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:19:42: error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
17 |
18 | private var audioURLs: [URL] = []
19 | private var preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5)
| `- error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
20 | private var audioFile: AVAudioFile?
21 | private var audioEngine: AVAudioEngine?
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:19:62: error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
17 |
18 | private var audioURLs: [URL] = []
19 | private var preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5)
| `- error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
20 | private var audioFile: AVAudioFile?
21 | private var audioEngine: AVAudioEngine?
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:27:35: error: 'CADisplayLink' is only available in macOS 14.0 or newer
10 |
11 | // MARK: - 音量正規化聲音播放器
12 | open class WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing class
13 |
14 | public let equalizer: Equalizer = .init()
:
25 | private var playbackState: PlaybackState = .idle
26 |
27 | private weak var displayLink: CADisplayLink?
| `- error: 'CADisplayLink' is only available in macOS 14.0 or newer
28 |
29 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:82: error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
51 |
52 | // MARK: - 公開函式
53 | public extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
54 |
55 | /// 設定代理與更新頻率,並初始化音訊引擎
:
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| | `- error: 'CAFrameRateRange' is only available in macOS 12.0 or newer
| `- note: add '@available' attribute to enclosing instance method
63 |
64 | self.delegate = delegate
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:155: error: 'AVAudioSession' is unavailable in macOS
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| `- error: 'AVAudioSession' is unavailable in macOS
63 |
64 | self.delegate = delegate
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h:29:12: note: 'AVAudioSession' has been explicitly marked unavailable here
27 | NS_SWIFT_SENDABLE
28 | API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
29 | @interface AVAudioSession : NSObject {
| `- note: 'AVAudioSession' has been explicitly marked unavailable here
30 | @private
31 | void *_impl;
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:62:102: error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
51 |
52 | // MARK: - 公開函式
53 | public extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
54 |
55 | /// 設定代理與更新頻率,並初始化音訊引擎
:
60 | /// - Throws: 當音訊會話或引擎初始化失敗時拋出錯誤
61 | @MainActor
62 | func prepare(audioURLs: [URL], delegate: Delegate?, preferredFrameRateRange: CAFrameRateRange = .init(minimum: 5, maximum: 5, preferred: 5), options: AVAudioSession.CategoryOptions = []) {
| | `- error: 'init(minimum:maximum:preferred:)' is only available in macOS 12.0 or newer
| `- note: add '@available' attribute to enclosing instance method
63 |
64 | self.delegate = delegate
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:143:40: error: 'CADisplayLink' is only available in macOS 14.0 or newer
135 |
136 | // MARK: - @objc
137 | @objc private extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
138 |
139 | /// 更新播放進度時間
:
141 | /// - Note: 此方法通常用於定期刷新目前播放時間並通知 delegate
142 | @MainActor
143 | func updatePlayTime(_ displayLink: CADisplayLink) {
| | `- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add '@available' attribute to enclosing instance method
144 |
145 | do {
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:160:35: error: 'AVAudioSession' is unavailable in macOS
158 | /// 初始化音樂引擎
159 | /// - Parameter options: AVAudioSession.CategoryOptions
160 | func initAudioEngine(options: AVAudioSession.CategoryOptions) throws {
| `- error: 'AVAudioSession' is unavailable in macOS
161 |
162 | let audioSession = AVAudioSession.sharedInstance()
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h:29:12: note: 'AVAudioSession' has been explicitly marked unavailable here
27 | NS_SWIFT_SENDABLE
28 | API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
29 | @interface AVAudioSession : NSObject {
| `- note: 'AVAudioSession' has been explicitly marked unavailable here
30 | @private
31 | void *_impl;
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:69:13: warning: no calls to throwing functions occur within 'try' expression
67 |
68 | do {
69 | try delegate?.audioPlayer(self, prepare: getTrackInfos())
| `- warning: no calls to throwing functions occur within 'try' expression
70 | try initAudioEngine(options: options)
71 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:162:28: error: 'AVAudioSession' is unavailable in macOS
160 | func initAudioEngine(options: AVAudioSession.CategoryOptions) throws {
161 |
162 | let audioSession = AVAudioSession.sharedInstance()
| `- error: 'AVAudioSession' is unavailable in macOS
163 |
164 | do {
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSession.h:29:12: note: 'AVAudioSession' has been explicitly marked unavailable here
27 | NS_SWIFT_SENDABLE
28 | API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos)
29 | @interface AVAudioSession : NSObject {
| `- note: 'AVAudioSession' has been explicitly marked unavailable here
30 | @private
31 | void *_impl;
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:162:43: error: 'sharedInstance()' is unavailable in macOS
160 | func initAudioEngine(options: AVAudioSession.CategoryOptions) throws {
161 |
162 | let audioSession = AVAudioSession.sharedInstance()
| `- error: 'sharedInstance()' is unavailable in macOS
163 |
164 | do {
AVFAudio.AVAudioSession.sharedInstance:3:19: note: 'sharedInstance()' has been explicitly marked unavailable here
1 | class AVAudioSession {
2 | @available(macOS, unavailable)
3 | open class func sharedInstance() -> AVAudioSession}
| `- note: 'sharedInstance()' has been explicitly marked unavailable here
4 |
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:165:30: error: 'setCategory(_:mode:options:)' is unavailable in macOS
163 |
164 | do {
165 | try audioSession.setCategory(.playback, mode: .default, options: options)
| `- error: 'setCategory(_:mode:options:)' is unavailable in macOS
166 | try audioSession.setActive(true)
167 | } catch {
AVFAudio.AVAudioSession.setCategory:3:13: note: 'setCategory(_:mode:options:)' has been explicitly marked unavailable here
1 | class AVAudioSession {
2 | @available(macOS, unavailable)
3 | open func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, options: AVAudioSession.CategoryOptions = []) throws}
| `- note: 'setCategory(_:mode:options:)' has been explicitly marked unavailable here
4 |
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:165:43: error: 'playback' is unavailable in macOS
163 |
164 | do {
165 | try audioSession.setCategory(.playback, mode: .default, options: options)
| `- error: 'playback' is unavailable in macOS
166 | try audioSession.setActive(true)
167 | } catch {
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h:100:40: note: 'playback' has been explicitly marked unavailable here
98 |
99 | /*! Use this category for music tracks.*/
100 | OS_EXPORT AVAudioSessionCategory const AVAudioSessionCategoryPlayback API_AVAILABLE(ios(3.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos);
| `- note: 'playback' has been explicitly marked unavailable here
101 |
102 | /*! Use this category when recording audio. */
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:165:60: error: 'default' is unavailable in macOS
163 |
164 | do {
165 | try audioSession.setCategory(.playback, mode: .default, options: options)
| `- error: 'default' is unavailable in macOS
166 | try audioSession.setActive(true)
167 | } catch {
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioSessionTypes.h:136:36: note: 'default' has been explicitly marked unavailable here
134 |
135 | /*! The default mode */
136 | OS_EXPORT AVAudioSessionMode const AVAudioSessionModeDefault API_AVAILABLE(ios(5.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos);
| `- note: 'default' has been explicitly marked unavailable here
137 |
138 | /*! Only valid with AVAudioSessionCategoryPlayAndRecord. Appropriate for Voice over IP
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:166:30: error: 'setActive' is unavailable in Swift
164 | do {
165 | try audioSession.setCategory(.playback, mode: .default, options: options)
166 | try audioSession.setActive(true)
| `- error: 'setActive' is unavailable in Swift
167 | } catch {
168 | throw CustomError.audioSessionConfigurationFailed
AVFAudio.AVAudioSession.setActive:4:13: note: 'setActive' has been explicitly marked unavailable here
2 | @available(macOS, unavailable)
3 | @available(*, unavailable, message: "Not available in Swift")
4 | open func setActive(_ active: Bool) throws}
| `- note: 'setActive' has been explicitly marked unavailable here
5 |
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:239:26: error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
154 |
155 | // MARK: - 小工具
156 | private extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 初始化音樂引擎
:
235 | /// - `PlaybackError.playerNodeNotReady`:playerNode 尚未準備好
236 | /// - 其他由上層呼叫流程拋出的錯誤
237 | func playAudioFile(audioFile: AVAudioFile, playerNode: AVAudioPlayerNode, callbackType: AVAudioPlayerNodeCompletionCallbackType = .dataPlayedBack) async throws -> AVAudioPlayerNodeCompletionCallbackType {
| `- note: add '@available' attribute to enclosing instance method
238 |
239 | return try await withCheckedContinuation { continuation in
| |- error: 'withCheckedContinuation(isolation:function:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
240 |
241 | playerNode.scheduleFile(audioFile, at: nil, completionCallbackType: callbackType) { [weak self] type in
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:239:51: error: 'isolation()' is only available in macOS 10.15 or newer
`- /Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:239:50: note: expanded code originates here
154 |
155 | // MARK: - 小工具
156 | private extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 初始化音樂引擎
:
235 | /// - `PlaybackError.playerNodeNotReady`:playerNode 尚未準備好
236 | /// - 其他由上層呼叫流程拋出的錯誤
237 | func playAudioFile(audioFile: AVAudioFile, playerNode: AVAudioPlayerNode, callbackType: AVAudioPlayerNodeCompletionCallbackType = .dataPlayedBack) async throws -> AVAudioPlayerNodeCompletionCallbackType {
| `- note: add '@available' attribute to enclosing instance method
238 |
239 | return try await withCheckedContinuation { continuation in
+--- /Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift
|237 |
|238 |
|239 | #isolation
| | `- error: 'isolation()' is only available in macOS 10.15 or newer
+-----------------------------------------------------------------------------------------------------------
240 |
241 | playerNode.scheduleFile(audioFile, at: nil, completionCallbackType: callbackType) { [weak self] type in
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:241:103: warning: variable 'self' was written to, but never read
239 | return try await withCheckedContinuation { continuation in
240 |
241 | playerNode.scheduleFile(audioFile, at: nil, completionCallbackType: callbackType) { [weak self] type in
| `- warning: variable 'self' was written to, but never read
242 | continuation.resume(returning: type)
243 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:239:16: warning: no calls to throwing functions occur within 'try' expression
237 | func playAudioFile(audioFile: AVAudioFile, playerNode: AVAudioPlayerNode, callbackType: AVAudioPlayerNodeCompletionCallbackType = .dataPlayedBack) async throws -> AVAudioPlayerNodeCompletionCallbackType {
238 |
239 | return try await withCheckedContinuation { continuation in
| `- warning: no calls to throwing functions occur within 'try' expression
240 |
241 | playerNode.scheduleFile(audioFile, at: nil, completionCallbackType: callbackType) { [weak self] type in
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:297:21: warning: instance will be immediately deallocated because property 'displayLink' is 'weak'
25 | private var playbackState: PlaybackState = .idle
26 |
27 | private weak var displayLink: CADisplayLink?
| `- note: 'displayLink' declared here
28 |
29 | public init() {}
:
295 | stopTimer()
296 |
297 | displayLink = CADisplayLink(target: self, selector: #selector(updatePlayTime(_:)))
| |- warning: instance will be immediately deallocated because property 'displayLink' is 'weak'
| `- note: a strong reference is required to prevent the instance from being deallocated
298 | displayLink?.add(to: .main, forMode: .common)
299 | displayLink?.preferredFrameRateRange = preferredFrameRateRange
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:297:23: error: 'CADisplayLink' is only available in macOS 14.0 or newer
154 |
155 | // MARK: - 小工具
156 | private extension WWNormalizeAudioPlayer {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 初始化音樂引擎
:
289 |
290 | /// 開始計時
291 | func startTimer() {
| `- note: add '@available' attribute to enclosing instance method
292 |
293 | guard (delegate != nil) else { return }
:
295 | stopTimer()
296 |
297 | displayLink = CADisplayLink(target: self, selector: #selector(updatePlayTime(_:)))
| |- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
298 | displayLink?.add(to: .main, forMode: .common)
299 | displayLink?.preferredFrameRateRange = preferredFrameRateRange
/Users/admin/builder/spi-builder-workspace/Sources/WWNormalizeAudioPlayer/WWNormalizeAudioPlayer.swift:297:23: error: 'init(target:selector:)' is unavailable in macOS
295 | stopTimer()
296 |
297 | displayLink = CADisplayLink(target: self, selector: #selector(updatePlayTime(_:)))
| `- error: 'init(target:selector:)' is unavailable in macOS
298 | displayLink?.add(to: .main, forMode: .common)
299 | displayLink?.preferredFrameRateRange = preferredFrameRateRange
/Applications/Xcode-26.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h:32:1: note: 'init(target:selector:)' has been explicitly marked unavailable here
30 | * For macOS, see NSView/NSWindow/NSScreen.displayLink(withTarget:selector:). */
31 |
32 | + (CADisplayLink *)displayLinkWithTarget:(id)target selector:(SEL)sel
| `- note: 'init(target:selector:)' has been explicitly marked unavailable here
33 | API_UNAVAILABLE(macos);
34 |
BUILD FAILURE 6.3 macosSpm