Post

Replies

Boosts

Views

Activity

Reply to Window NSWindow 0x137632e40 ordered front from a non-active application and may order beneath the active application's windows
This is not a meaningless issue. This will cause unexpected behavior like error alert doesn't show in SwiftUI. If you encounter the same like me. You can get the window and make it key and front to fix this issue. I used https://github.com/happycodelucky/SwiftUIWindowBinder to get the NSWindow. And used below func to make it key and front. var body: some View { WindowBinder(window: $window) { // content view } .onAppear { makeKeyAndFront() } } private func makeKeyAndFront() { if let window { window.makeKeyAndOrderFront(nil) } else { DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(100)) { makeKeyAndFront() } } }
Jul ’23
Reply to SwiftUI Timer not working inside Menu bar extra
You should read the document of the Timer. The timer need to run in a runloop, which Window has but menu hasn't. So if you want to use a timer inside the menu, you may need to create a runloop and add the timer to it. That might work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Window NSWindow 0x137632e40 ordered front from a non-active application and may order beneath the active application's windows
This is not a meaningless issue. This will cause unexpected behavior like error alert doesn't show in SwiftUI. If you encounter the same like me. You can get the window and make it key and front to fix this issue. I used https://github.com/happycodelucky/SwiftUIWindowBinder to get the NSWindow. And used below func to make it key and front. var body: some View { WindowBinder(window: $window) { // content view } .onAppear { makeKeyAndFront() } } private func makeKeyAndFront() { if let window { window.makeKeyAndOrderFront(nil) } else { DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(100)) { makeKeyAndFront() } } }
Replies
Boosts
Views
Activity
Jul ’23
Reply to Critical Alerts entitlement
I have a workaround. Get Critical Alert Permission from User instead of Apple https://zhaoxin.pro/16703819971617.html
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to App Store Connect does not accept back-deploy concurrency macOS App that build by Xcode 13.2
Still the same with Xcode 13.2.1 (13C100).
Replies
Boosts
Views
Activity
Dec ’21
Reply to App Store Connect does not accept back-deploy concurrency macOS App that build by Xcode 13.2
Oddly enough, I found that App Store accepted my app in iOS/iPadOS while it rejected the macOS version with the same core. Both of them shared the same core. So there was also a "libswift_Concurrency.dylib" in iOS version, but it was accepted.
Replies
Boosts
Views
Activity
Dec ’21
Reply to App Store Connect does not accept back-deploy concurrency macOS App that build by Xcode 13.2
The same issue here. However, I can get my app notarized. So just no App Store.
Replies
Boosts
Views
Activity
Dec ’21