Hello. I'm start learn creating frameworks, and very want to create frameworks for Cocoa Application within SPM. I just want to make draws on the screen. So I found that is very hard. So my question is, do you know any packages which work with hardware on MacOS and can draw on the screen? For make drawing apps not with Cocoa but instead on pure Swift.
Upd. After all I could draw the little orange screen via this code in main.swift of my package.
import Cocoa
func graphic() {
let application = NSApplication.shared
let rect = NSRect(x:100,y:100,width:100,height:100)
let window = NSWindow(contentRect: rect, styleMask: NSWindow.StyleMask.borderless, backing: NSWindow.BackingStoreType.buffered, defer: false)
window.backgroundColor = NSColor.orange
window.makeKeyAndOrderFront(nil)
NSApp.run()
}
graphic()