AudioKitUI icon indicating copy to clipboard operation
AudioKitUI copied to clipboard

Error on compilation of SpectrogramFlatView/UIColor+intermediate.swift for macOS

Open mahal opened this issue 11 months ago • 3 comments

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 14

Description

Swift Test of Pull Request #82 failed: AudioKitUI/AudioKitUI/Sources/AudioKitUI/Visualizations/SpectrogramFlatView/UIColor+intermediate.swift:4:8

error: no such module 'UIKit'
import UIKit

Needs some NSColor alternative to UIColor.

Crash Logs, Screenshots or Other Attachments (if applicable)

https://github.com/AudioKit/AudioKitUI/actions/runs/8328777809/job/22793681000?pr=82

mahal avatar Mar 18 '24 16:03 mahal

Or alternatively mark SpectrogramFlatView as not compatible with macOS.

mahal avatar Mar 18 '24 16:03 mahal

UIImage and NSImage are very much interchangable, as are UIColor and NSColor. But the tricky part is the rendering with UIGraphicsImageRenderer, that would have to be rewritten for macOS using CoreGraphics.

mahal avatar Mar 18 '24 21:03 mahal

Fixed with PR #85

mahal avatar Mar 19 '24 19:03 mahal