Build Information
Failed to build WWSpectrumViewUI, reference 1.0.0 (dafd06), with Swift 6.1 for macOS (SPM) on 29 Jun 2026 15:32:50 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64Build Log
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:31:25: error: 'easeOut(duration:)' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
29 | makeView(with: style)
30 | }
31 | .animation(.easeOut(duration: duration), value: amplitude)
| |- error: 'easeOut(duration:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:47:20: error: 'RoundedRectangle' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
45 | let barColor = colorScheme.color(for: band, totalBars: 48)
46 | let clampedHeight = max(height, 2)
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
| |- error: 'RoundedRectangle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 |
49 | return ZStack(alignment: .center) {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: error: 'ZStack' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- error: 'ZStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:35: error: 'center' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- error: 'center' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:54:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
52 | case .rounded:
53 | base.fill(barColor)
54 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
55 | case .glow:
56 | base.fill(barColor)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:57:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
55 | case .glow:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:58:22: error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
| |- error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:58:45: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:59:22: error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
| |- error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
60 | case .gradient:
61 | base.fill(
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:59:45: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
60 | case .gradient:
61 | base.fill(
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:62:21: error: 'LinearGradient' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
60 | case .gradient:
61 | base.fill(
62 | LinearGradient(
| |- error: 'LinearGradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
64 | startPoint: .bottom,
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:43: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:64: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:88: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:68:18: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
66 | )
67 | )
68 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
69 | case .sharp:
70 | Rectangle()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'Rectangle' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'Rectangle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:71:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
69 | case .sharp:
70 | Rectangle()
71 | .fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
72 | .frame(width: width, height: clampedHeight)
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:72:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
70 | Rectangle()
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
[5/10] Compiling WWSpectrumViewUI Model.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:13:10: error: 'Published' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
14 |
15 | public init() {}
<unknown>:0: error: cannot convert value of type 'any KeyPath<WWSpectrumViewUI.ViewModel, [WWSpectrumViewUI.BandRaw]> & Sendable' to expected argument type 'ReferenceWritableKeyPath<WWSpectrumViewUI.ViewModel, [WWSpectrumViewUI.BandRaw]>'
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:12:28: error: 'ObservableObject' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
14 |
[6/10] Compiling WWSpectrumViewUI resource_bundle_accessor.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/10] Emitting module WWSpectrumViewUI
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:31:22: error: 'Color' is only available in macOS 10.15 or newer
21 |
22 | /// 頻譜條的顏色方案 => 用來決定每一根 bar 的顏色分布方式
23 | enum ColorScheme {
| `- note: add @available attribute to enclosing enum
24 |
25 | case rainbow // 彩虹色漸層
:
29 | case sunset // 日落色系
30 | case matrix // 綠色矩陣風格
31 | case custom([Color]) // 自訂顏色陣列
| `- error: 'Color' is only available in macOS 10.15 or newer
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:46:68: error: 'Color' is only available in macOS 10.15 or newer
34 |
35 | // MARK: - WWSpectrumViewUI.ColorScheme
36 | extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
37 |
38 | /// 根據 bar 的索引與振幅,計算對應的顏色
:
44 | /// - totalBars: bar 的總數,用來推算相對位置
45 | /// - Returns: 對應的顏色
46 | func color(for band: WWSpectrumViewUI.Band, totalBars: Int) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
47 |
48 | let position = Float(band.index) / Float(totalBars - 1)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:67:67: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:73:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:89:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:95:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:101:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:113:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:54: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:14:68: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:19:79: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
21 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:11:11: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:13:10: error: 'Published' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
14 |
15 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:12:28: error: 'ObservableObject' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
14 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:26:24: error: 'View' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:42:66: error: 'View' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:13:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
14 |
15 | public let colorScheme: ColorScheme
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:34:27: error: 'View' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:64:68: error: 'View' is only available in macOS 10.15 or newer
57 |
58 | // MARK: - 小工具
59 | private extension WWSpectrumViewUI {
| `- note: add @available attribute to enclosing extension
60 |
61 | /// 根據 bar 尺寸與原始頻帶資料,建立對應的頻譜條視圖
62 | ///
63 | /// 這個方法會先根據 `BandRaw` 計算振幅,再換算出 bar 的顯示高度,最後交給 `BandView` 負責實際繪製
64 | func makeBandView(with barSize: CGSize, band: BandRaw) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
65 |
66 | let amplitude = bandAmplitude(band)
[8/10] Compiling WWSpectrumViewUI Constant.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:31:22: error: 'Color' is only available in macOS 10.15 or newer
21 |
22 | /// 頻譜條的顏色方案 => 用來決定每一根 bar 的顏色分布方式
23 | enum ColorScheme {
| `- note: add @available attribute to enclosing enum
24 |
25 | case rainbow // 彩虹色漸層
:
29 | case sunset // 日落色系
30 | case matrix // 綠色矩陣風格
31 | case custom([Color]) // 自訂顏色陣列
| `- error: 'Color' is only available in macOS 10.15 or newer
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:46:68: error: 'Color' is only available in macOS 10.15 or newer
34 |
35 | // MARK: - WWSpectrumViewUI.ColorScheme
36 | extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
37 |
38 | /// 根據 bar 的索引與振幅,計算對應的顏色
:
44 | /// - totalBars: bar 的總數,用來推算相對位置
45 | /// - Returns: 對應的顏色
46 | func color(for band: WWSpectrumViewUI.Band, totalBars: Int) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
47 |
48 | let position = Float(band.index) / Float(totalBars - 1)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:67:67: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:73:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:89:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:95:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:101:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:113:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:54: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:69:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:76:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
76 | return Color.initWith(red: position * 3, green: 0, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
77 | }
78 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:81:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
:
79 | if position < 0.66 {
80 | let t = (position - 0.33) * 3
81 | return Color.initWith(red: 1, green: t * amplitude, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
82 | }
83 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:85:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
:
83 |
84 | let t = (position - 0.66) * 3
85 | return Color.initWith(red: 1, green: 1, blue: t * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
86 | }
87 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:91:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
92 | }
93 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:97:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
98 | }
99 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:105:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
104 | let t = position * 2
105 | return Color.initWith(red: 0.5 + t * 0.5, green: t * 0.3, blue: 0.5 - t * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | }
107 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:109:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
:
107 |
108 | let t = (position - 0.5) * 2
109 | return Color.initWith(red: 1, green: 0.5 + t * 0.5, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:114:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
115 | }
116 |
[9/10] Compiling WWSpectrumViewUI Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:14:68: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:19:79: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
21 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:11:11: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:15:9: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:15:9: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:20:9: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
21 | }
22 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:20:9: error: 'init(hue:saturation:brightness:opacity:)' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
| |- error: 'init(hue:saturation:brightness:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
21 | }
22 | }
[10/10] Compiling WWSpectrumViewUI WWSpectrumViewUI.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:13:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
14 |
15 | public let colorScheme: ColorScheme
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:34:27: error: 'View' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:64:68: error: 'View' is only available in macOS 10.15 or newer
57 |
58 | // MARK: - 小工具
59 | private extension WWSpectrumViewUI {
| `- note: add @available attribute to enclosing extension
60 |
61 | /// 根據 bar 尺寸與原始頻帶資料,建立對應的頻譜條視圖
62 | ///
63 | /// 這個方法會先根據 `BandRaw` 計算振幅,再換算出 bar 的顯示高度,最後交給 `BandView` 負責實際繪製
64 | func makeBandView(with barSize: CGSize, band: BandRaw) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
65 |
66 | let amplitude = bandAmplitude(band)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:28:9: error: setter for 'viewModel' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
24 | /// - barStyle: bar 的顯示樣式,預設為 `.glow`
25 | /// - duration: 振幅變化動畫時間,預設為 `0.25` 秒
26 | public init(viewModel: WWSpectrumViewUI.ViewModel, colorScheme: ColorScheme = .rainbow, barStyle: BarStyle = .glow, duration: TimeInterval = 0.25) {
| `- note: add @available attribute to enclosing initializer
27 |
28 | self.viewModel = viewModel
| |- error: setter for 'viewModel' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | self.colorScheme = colorScheme
30 | self.barStyle = barStyle
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:36:9: error: 'GeometryReader' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
| |- error: 'GeometryReader' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
37 |
38 | let bands = viewModel.rawBands
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:36:24: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
37 |
38 | let bands = viewModel.rawBands
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:13: error: 'HStack' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- error: 'HStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:13: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:32: error: 'bottom' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- error: 'bottom' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: error: 'ForEach' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- error: 'ForEach' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: error: 'init(_:id:content:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- error: 'init(_:id:content:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:58: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:51:14: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
49 | }
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | .background(Color.clear)
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:51:90: error: 'bottom' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
49 | }
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
| |- error: 'bottom' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | .background(Color.clear)
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:14: error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:25: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:31: error: 'clear' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'clear' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:54:10: error: 'clipped(antialiased:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
52 | .background(Color.clear)
53 | }
54 | .clipped()
| |- error: 'clipped(antialiased:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
55 | }
56 | }
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/8] Compiling WWSpectrumViewUI resource_bundle_accessor.swift
[3/8] Emitting module WWSpectrumViewUI
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:31:22: error: 'Color' is only available in macOS 10.15 or newer
21 |
22 | /// 頻譜條的顏色方案 => 用來決定每一根 bar 的顏色分布方式
23 | enum ColorScheme {
| `- note: add @available attribute to enclosing enum
24 |
25 | case rainbow // 彩虹色漸層
:
29 | case sunset // 日落色系
30 | case matrix // 綠色矩陣風格
31 | case custom([Color]) // 自訂顏色陣列
| `- error: 'Color' is only available in macOS 10.15 or newer
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:46:68: error: 'Color' is only available in macOS 10.15 or newer
34 |
35 | // MARK: - WWSpectrumViewUI.ColorScheme
36 | extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
37 |
38 | /// 根據 bar 的索引與振幅,計算對應的顏色
:
44 | /// - totalBars: bar 的總數,用來推算相對位置
45 | /// - Returns: 對應的顏色
46 | func color(for band: WWSpectrumViewUI.Band, totalBars: Int) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
47 |
48 | let position = Float(band.index) / Float(totalBars - 1)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:67:67: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:73:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:89:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:95:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:101:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:113:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:54: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:14:68: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:19:79: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
21 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:11:11: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:13:10: error: 'Published' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
14 |
15 | public init() {}
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:12:28: error: 'ObservableObject' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
14 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:26:24: error: 'View' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:42:66: error: 'View' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:13:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
14 |
15 | public let colorScheme: ColorScheme
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:34:27: error: 'View' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:64:68: error: 'View' is only available in macOS 10.15 or newer
57 |
58 | // MARK: - 小工具
59 | private extension WWSpectrumViewUI {
| `- note: add @available attribute to enclosing extension
60 |
61 | /// 根據 bar 尺寸與原始頻帶資料,建立對應的頻譜條視圖
62 | ///
63 | /// 這個方法會先根據 `BandRaw` 計算振幅,再換算出 bar 的顯示高度,最後交給 `BandView` 負責實際繪製
64 | func makeBandView(with barSize: CGSize, band: BandRaw) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
65 |
66 | let amplitude = bandAmplitude(band)
[4/8] Compiling WWSpectrumViewUI BandView.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:26:24: error: 'View' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:42:66: error: 'View' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:28:13: error: 'ZStack' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
| |- error: 'ZStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | makeView(with: style)
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:28:32: error: 'bottom' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
| |- error: 'bottom' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | makeView(with: style)
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:31:14: error: 'animation(_:value:)' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
29 | makeView(with: style)
30 | }
31 | .animation(.easeOut(duration: duration), value: amplitude)
| |- error: 'animation(_:value:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:31:25: error: 'easeOut(duration:)' is only available in macOS 10.15 or newer
12 |
13 | /// 這個 view 會根據 band 的頻率範圍、振幅、顏色方案與樣式,將一筆頻帶資料畫成一根可動畫的頻譜條
14 | struct BandView: View {
| `- note: add @available attribute to enclosing struct
15 |
16 | let index: Int // bar 的索引
:
24 | let style: BarStyle // bar 的外觀樣式
25 |
26 | var body: some View {
| `- note: add @available attribute to enclosing property
27 |
28 | ZStack(alignment: .bottom) {
29 | makeView(with: style)
30 | }
31 | .animation(.easeOut(duration: duration), value: amplitude)
| |- error: 'easeOut(duration:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:47:20: error: 'RoundedRectangle' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
45 | let barColor = colorScheme.color(for: band, totalBars: 48)
46 | let clampedHeight = max(height, 2)
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
| |- error: 'RoundedRectangle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 |
49 | return ZStack(alignment: .center) {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: error: 'ZStack' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- error: 'ZStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:16: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:35: error: 'center' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- error: 'center' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of 'Color' to 'ShapeStyle' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:54:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
52 | case .rounded:
53 | base.fill(barColor)
54 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
55 | case .glow:
56 | base.fill(barColor)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:53:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
51 | switch style {
52 | case .rounded:
53 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:57:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
55 | case .glow:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:58:22: error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
| |- error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:58:45: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
56 | base.fill(barColor)
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:59:22: error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
| |- error: 'shadow(color:radius:x:y:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
60 | case .gradient:
61 | base.fill(
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:59:45: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
60 | case .gradient:
61 | base.fill(
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:56:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
54 | .frame(width: width, height: clampedHeight)
55 | case .glow:
56 | base.fill(barColor)
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
57 | .frame(width: width, height: clampedHeight)
58 | .shadow(color: barColor.opacity(0.16), radius: 10, x: 0, y: 0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:62:21: error: 'LinearGradient' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
60 | case .gradient:
61 | base.fill(
62 | LinearGradient(
| |- error: 'LinearGradient' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
64 | startPoint: .bottom,
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:43: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:64: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:63:88: error: 'opacity' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
61 | base.fill(
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
| |- error: 'opacity' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
64 | startPoint: .bottom,
65 | endPoint: .top
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:68:18: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
66 | )
67 | )
68 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
69 | case .sharp:
70 | Rectangle()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:61:17: error: 'buildEither(first:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
59 | .shadow(color: barColor.opacity(0.22), radius: 4, x: 0, y: 0)
60 | case .gradient:
61 | base.fill(
| |- error: 'buildEither(first:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
62 | LinearGradient(
63 | colors: [barColor.opacity(1), barColor.opacity(0.65), barColor.opacity(0.25)],
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'Rectangle' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'Rectangle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:71:22: error: 'fill(_:style:)' is only available in macOS 14.0 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
69 | case .sharp:
70 | Rectangle()
71 | .fill(barColor)
| |- error: 'fill(_:style:)' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
72 | .frame(width: width, height: clampedHeight)
73 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:72:22: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
70 | Rectangle()
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:70:17: error: 'buildEither(second:)' is only available in macOS 10.15 or newer
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
68 | .frame(width: width, height: clampedHeight)
69 | case .sharp:
70 | Rectangle()
| |- error: 'buildEither(second:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
71 | .fill(barColor)
72 | .frame(width: width, height: clampedHeight)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/View/BandView.swift:49:43: warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
35 |
36 | // MARK: - 小工具
37 | private extension WWSpectrumViewUI.BandView {
| `- note: add @available attribute to enclosing extension
38 |
39 | /// 依照指定樣式建立 bar 的實際外觀
40 | ///
41 | /// 這個方法會先把目前的 band 資料轉成 `Band`,再依據 `ColorScheme` 與 `BarStyle` 決定要畫成圓角、發光、漸層或銳角樣式
42 | func makeView(with style: WWSpectrumViewUI.BarStyle) -> some View {
| `- note: add @available attribute to enclosing instance method
43 |
44 | let band = WWSpectrumViewUI.Band(index: index, lowerFrequency: lowerFrequency, upperFrequency: upperFrequency, amplitude: Float(amplitude))
:
47 | let base = RoundedRectangle(cornerRadius: min(width * 0.45, 6), style: .continuous)
48 |
49 | return ZStack(alignment: .center) {
| |- warning: conformance of '_ConditionalContent<TrueContent, FalseContent>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
50 |
51 | switch style {
[5/8] Compiling WWSpectrumViewUI Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:14:68: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:19:79: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
21 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:11:11: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:15:9: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:15:9: error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
14 | static func initWith(red: Float, green: Float, blue: Float) -> Color {
| `- note: add @available attribute to enclosing static method
15 | Color(red: Double(red), green: Double(green), blue: Double(blue))
| |- error: 'init(_:red:green:blue:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
16 | }
17 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:20:9: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
21 | }
22 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Extension.swift:20:9: error: 'init(hue:saturation:brightness:opacity:)' is only available in macOS 10.15 or newer
9 |
10 | // MARK: - Color
11 | extension Color {
| `- note: add @available attribute to enclosing extension
12 |
13 | /// 使用 `Float` 也能建立 `Color`
:
17 |
18 | /// 使用 `Float` 也能建立 `Color`
19 | static func initWith(hue: Float, saturation: Float, brightness: Float) -> Color {
| `- note: add @available attribute to enclosing static method
20 | Color(hue: Double(hue), saturation: Double(saturation), brightness: Double(saturation))
| |- error: 'init(hue:saturation:brightness:opacity:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
21 | }
22 | }
[6/8] Compiling WWSpectrumViewUI Constant.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:31:22: error: 'Color' is only available in macOS 10.15 or newer
21 |
22 | /// 頻譜條的顏色方案 => 用來決定每一根 bar 的顏色分布方式
23 | enum ColorScheme {
| `- note: add @available attribute to enclosing enum
24 |
25 | case rainbow // 彩虹色漸層
:
29 | case sunset // 日落色系
30 | case matrix // 綠色矩陣風格
31 | case custom([Color]) // 自訂顏色陣列
| `- error: 'Color' is only available in macOS 10.15 or newer
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:46:68: error: 'Color' is only available in macOS 10.15 or newer
34 |
35 | // MARK: - WWSpectrumViewUI.ColorScheme
36 | extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
37 |
38 | /// 根據 bar 的索引與振幅,計算對應的顏色
:
44 | /// - totalBars: bar 的總數,用來推算相對位置
45 | /// - Returns: 對應的顏色
46 | func color(for band: WWSpectrumViewUI.Band, totalBars: Int) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
47 |
48 | let position = Float(band.index) / Float(totalBars - 1)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:67:67: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:73:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:89:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:95:64: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:101:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:113:66: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:54: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:118:65: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
116 |
117 | /// 自訂色彩陣列 => 依據 bar 的相對位置,從指定的顏色列表中挑選對應顏色
118 | func customScheme(with position: Float, colors: [Color]) -> Color {
| | `- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
119 | let colorIndex = min(Int(position * Float(colors.count - 1)), colors.count - 1)
120 | return colors[colorIndex]
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:69:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
67 | func rainbowScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
68 | let hue = 1.0 - position
69 | return Color.initWith(hue: hue, saturation: 0.9 + amplitude * 0.1, brightness: 1.0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
70 | }
71 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:76:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
76 | return Color.initWith(red: position * 3, green: 0, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
77 | }
78 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:81:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
:
79 | if position < 0.66 {
80 | let t = (position - 0.33) * 3
81 | return Color.initWith(red: 1, green: t * amplitude, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
82 | }
83 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:85:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
71 |
72 | /// 火焰色系 => 依據 bar 的位置分成紅、橘、黃三段,呈現火焰漸層感
73 | func fireScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
74 |
75 | if position < 0.33 {
:
83 |
84 | let t = (position - 0.66) * 3
85 | return Color.initWith(red: 1, green: 1, blue: t * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
86 | }
87 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:91:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
87 |
88 | /// 海洋色系 => 以藍綠色調為主,並用振幅調整飽和度與亮度
89 | func oceanScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
90 | let hue = 0.6 - position * 0.4
91 | return Color.initWith(hue: hue, saturation: 0.7 + amplitude * 0.3, brightness: 0.5 + amplitude * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
92 | }
93 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:97:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
93 |
94 | /// 霓虹色系 => 使用高飽和、高亮度的顏色,呈現強烈的視覺效果
95 | func neonScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
96 | let hue = 0.8 - position * 0.4
97 | return Color.initWith(hue: hue, saturation: 1.0, brightness: 1.0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
98 | }
99 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:105:20: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
104 | let t = position * 2
105 | return Color.initWith(red: 0.5 + t * 0.5, green: t * 0.3, blue: 0.5 - t * 0.5)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | }
107 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:109:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
99 |
100 | /// 日落色系 => 前半段偏紫紅,後半段逐漸轉為橘黃
101 | func sunsetScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
102 |
103 | if position < 0.5 {
:
107 |
108 | let t = (position - 0.5) * 2
109 | return Color.initWith(red: 1, green: 0.5 + t * 0.5, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Constant.swift:114:16: error: 'Color' is only available in macOS 10.15 or newer
62 |
63 | // MARK: - WWSpectrumViewUI.ColorScheme
64 | private extension WWSpectrumViewUI.ColorScheme {
| `- note: add @available attribute to enclosing extension
65 |
66 | /// 彩虹色系 => 顏色會依據 bar 的相對位置改變色相,並用振幅微調飽和度
:
111 |
112 | /// 綠色矩陣風格 => 依據振幅調整綠色強度,產生類似終端機風格的效果
113 | func matrixScheme(with position: Float, amplitude: Float) -> Color {
| `- note: add @available attribute to enclosing instance method
114 | return Color.initWith(red: 0, green: amplitude, blue: 0)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
115 | }
116 |
[7/8] Compiling WWSpectrumViewUI WWSpectrumViewUI.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:13:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
14 |
15 | public let colorScheme: ColorScheme
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:34:27: error: 'View' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:64:68: error: 'View' is only available in macOS 10.15 or newer
57 |
58 | // MARK: - 小工具
59 | private extension WWSpectrumViewUI {
| `- note: add @available attribute to enclosing extension
60 |
61 | /// 根據 bar 尺寸與原始頻帶資料,建立對應的頻譜條視圖
62 | ///
63 | /// 這個方法會先根據 `BandRaw` 計算振幅,再換算出 bar 的顯示高度,最後交給 `BandView` 負責實際繪製
64 | func makeBandView(with barSize: CGSize, band: BandRaw) -> some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
65 |
66 | let amplitude = bandAmplitude(band)
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:28:9: error: setter for 'viewModel' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
24 | /// - barStyle: bar 的顯示樣式,預設為 `.glow`
25 | /// - duration: 振幅變化動畫時間,預設為 `0.25` 秒
26 | public init(viewModel: WWSpectrumViewUI.ViewModel, colorScheme: ColorScheme = .rainbow, barStyle: BarStyle = .glow, duration: TimeInterval = 0.25) {
| `- note: add @available attribute to enclosing initializer
27 |
28 | self.viewModel = viewModel
| |- error: setter for 'viewModel' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
29 | self.colorScheme = colorScheme
30 | self.barStyle = barStyle
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:36:9: error: 'GeometryReader' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
| |- error: 'GeometryReader' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
37 |
38 | let bands = viewModel.rawBands
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:36:24: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
37 |
38 | let bands = viewModel.rawBands
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:13: error: 'HStack' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- error: 'HStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:13: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:32: error: 'bottom' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- error: 'bottom' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: error: 'ForEach' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- error: 'ForEach' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:47:17: error: 'init(_:id:content:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
45 | HStack(alignment: .bottom, spacing: spacing) {
46 |
47 | ForEach(bands, id: \.index) { band in
| |- error: 'init(_:id:content:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
48 | makeBandView(with: .init(width: barWidth, height: availableHeight), band: band)
49 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:45:58: warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
43 | let availableHeight = geometry.size.height - 16
44 |
45 | HStack(alignment: .bottom, spacing: spacing) {
| |- warning: conformance of 'ForEach<Data, ID, Content>' to 'View' is only available in macOS 10.15 or newer; this is an error in the Swift 6 language mode
| `- note: add 'if #available' version check
46 |
47 | ForEach(bands, id: \.index) { band in
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:51:14: error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
49 | }
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
| |- error: 'frame(width:height:alignment:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | .background(Color.clear)
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:51:90: error: 'bottom' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
49 | }
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
| |- error: 'bottom' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
52 | .background(Color.clear)
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:14: error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'background(_:ignoresSafeAreaEdges:)' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:25: error: 'Color' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'Color' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:52:31: error: 'clear' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
50 | }
51 | .frame(width: geometry.size.width, height: geometry.size.height, alignment: .bottom)
52 | .background(Color.clear)
| |- error: 'clear' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
53 | }
54 | .clipped()
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/WWSpectrumViewUI.swift:54:10: error: 'clipped(antialiased:)' is only available in macOS 10.15 or newer
9 |
10 | /// 頻譜分析結果的 SwiftUI 視覺化元件
11 | public struct WWSpectrumViewUI: View {
| `- note: add @available attribute to enclosing struct
12 |
13 | @ObservedObject var viewModel: WWSpectrumViewUI.ViewModel
:
32 | }
33 |
34 | public var body: some View {
| `- note: add @available attribute to enclosing property
35 |
36 | GeometryReader { geometry in
:
52 | .background(Color.clear)
53 | }
54 | .clipped()
| |- error: 'clipped(antialiased:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
55 | }
56 | }
[8/8] Compiling WWSpectrumViewUI Model.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:13:10: error: 'Published' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
| `- error: 'Published' is only available in macOS 10.15 or newer
14 |
15 | public init() {}
<unknown>:0: error: cannot convert value of type 'KeyPath<WWSpectrumViewUI.ViewModel, [WWSpectrumViewUI.BandRaw]>' to expected argument type 'ReferenceWritableKeyPath<WWSpectrumViewUI.ViewModel, [WWSpectrumViewUI.BandRaw]>'
/Users/admin/builder/spi-builder-workspace/Sources/WWSpectrumViewUI/Utility/Model.swift:12:28: error: 'ObservableObject' is only available in macOS 10.15 or newer
10 | public extension WWSpectrumViewUI {
11 |
12 | final class ViewModel: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
13 | @Published public var rawBands: [BandRaw] = []
14 |
BUILD FAILURE 6.1 macosSpm