Hi!
I tried the new rename button, but I don't see how is this supposed to work in a document app; I can't find a way to access the file to get the binding. There is next to no documentation on anything, I don't understand why SwiftUI gets almost zero attention from Apple.
Also, the toolbar has a double back button for some reason. Even with just the template.
Post
Replies
Boosts
Views
Activity
Hello, I am on the Xcode Beta due to Ventura support, so obviously I can't upload apps archived on my device. I wanted to use Xcode Cloud, however I am getting an error
Hey, I'm creating an NSStatusItem but I can't access the button, it crashes if I unwrap it.
import Cocoa
func main() {
let delegate = AppDelegate()
let app = NSApplication.shared
app.delegate = delegate
app.setActivationPolicy(.prohibited)
app.run()
}
final class AppDelegate: NSObject, NSApplicationDelegate {
var item: NSStatusItem!
func applicationDidFinishLaunching(_ aNotification: Notification) {
item = NSStatusItem()
item.behavior = [.removalAllowed, .terminationOnRemoval]
item.button!.image = NSImage(named: "circle.fill") // Crashes here
}
}