I want to dismiss a window when a user presses a button. I have tried the @Environment dismissWindow, however that's macOS 14+. My app requires compatibility with macOS 13 at minimum.
Post
Replies
Boosts
Views
Activity
Currently for my SwiftUI application i'm using dismissWindow() to close my windows. However, I want to make my app compatible on macOS 13 to enable a wider audience.
My current usage of this function is as follows:
func reloadContentViewAfterDelete() {
@Environment(\.openWindow) var openWindow
@Environment(\.dismissWindow) var dismissWindow
dismissWindow(id: "content")
openWindow(id: "content")
}
I'm trying to get some people to test my application, but when they attempt to open it, it says "Malware blocked and moved to bin". Attempting to open it on my mac has no issues, but on theirs it will get flagged.
Are there any solutions? I think this is to do with the signature, however this could be wrong.
I am sending a direct archive through iMessage in a zip file.
I have a ForEach loop in my code which is used to display text per child of an array (i think it's an array).
var flags: [String: Any] = [
"Flag1": "FlagValue"
// More values will go here, by default there are no values (but can be
// loaded in)
]
And this is my code
// CONTENT
HStack {
VStack {
ForEach(0...flags.count, id: \.self) { flag in
Text("hey")
}
}
}
When I start the app there's only one "hey" and no more will show up when I add more flags.
I'm trying to make my GameOverScene load when I supposedly "die" but all i get in the editor is signal SIGABRT. Here is some code for it.
if self.livesArray.count == 0 { let gameOver = SKScene(fileNamed: "GameOverScene") as! GameOverScene //This line causes SIGABRT gameOver.score = self.score self.view?.presentScene(gameOver)}
Please can someone help me? Also i dont know where to find the debugger :P
I am making an app in SwiftUI, but the backend code relies on python and cannot be converted to swift. How can I get the file to run?
What is the difference between the two betas?
Is one ahead of the other or is it just that one is more expensive?