Search results for

“swiftui”

17,110 results found

Post

Replies

Boosts

Views

Activity

tvOS Simulator (also Xcode Canvas) Mapview Artifacts After Xcode Crash (26.3)
Have a peculiar problem I'm not able to solve. Working on an app with a mapview in the max zoomed out globe level. For some reason this morning Xcode froze/crashed when I was working and I had to force quit to get it back up. Then a new issue of graphical artifacts on the space section of the Mapview showed up. This Tuesday has now been spent in full on trying to solve this to no avail. I created a new project for iOS/iPadOS and added a similar map implementation. It works fine. I used Claude to help me after a few reinstalls of Xcode with this. I asked claude to summarize - this is what has been done: Claude generative AI summary starts here---------- Here's a complete summary of everything attempted: The Problem SwiftUI tvOS app with MapKit globe view showing severe rendering artifacts — corrupted pixels surrounding the globe. Started after Xcode crashed while the tvOS simulator was actively running. iOS simulator, macOS Maps app, and all native apps work perfectly. Only tvOS simulator MapKit is af
2
0
323
Mar ’26
Reply to Extended Runtime API - Health Monitoring
Ok, thank you Ziqiao for the detailed & quick response, most appreciated. Folks who are exploring how to achieve that goal might consider shifting the direction. I agree... I just hope we can either clarify better alternative for those apps, or if not available, provide input to future APIs. In that case, I can ony suggest that yo file a feedback report, as mentioned in the post. If you already have one, please share so I can check the status. I see folks reporting this issue from time to time, but haven't yet seen them sharing their report. I have filed a feedback FB22115840 and created a sample project and provided a crash report. I think all the code is correct in terms of calling of completionHandler() and I've tried to simplify the project🤞🤞 really hope this is useful as would love to see a fix soon. The SwiftUI equivalent is backgroundTask(_:action:). I read the guidance but I still struggle to understand if on WatchOS, when using that API, you can avoid using a @WKExtensionDelegateAdapto
Mar ’26
Problems with iPad Pro M4 13 inch
We have an iOS/iPadOS (mixed use of UIKit/SwiftUI) app on the App Store since a couple of years. Over the last month or so, we are receiving many user reports complaining about app freezing and behaving very bad generally. The common denominator for all of these users (~10) is that they are using iPad Pro M4, 13 inch, and they are on at least iPadOS 26.2 - some have updated to 26.2.1, 26.3 etc but the problems remain. Some of the users say that they were using our app normally, until the release of 26.2, or perhaps 26.2.1, from when the problems seem to have started. Some report the problems that go away when they use another WiFi, or when they hold the device in portrait mode (it seems that many complaints seem to suggest that the problem is in when holding the device in landscape). Other say the app works fine if they start it without network enabled, and after enabling network, continue in the app. While we currently do not have an iPad Pro M4 13 inch to test with, we haven't been able to reproduc
3
0
446
Mar ’26
Reply to TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
Thanks for the quick response. I’d prefer to use a pure SwiftUI text solution, but at the moment I need TextKit 2 for features SwiftUI still doesn’t expose—real-time syntax highlighting, paragraphStyle handling, tracking visibleRect changes, and related editor behaviors. Below is a minimal example showing how I’m using NSTextLayoutManager rendering attributes for a dynamic highlight. import SwiftUI struct RATestView: View { @State private var text = TextKit 2 rendering highlight demo. Type something and watch highlight update. @State private var search = highlight var body: some View { VStack { TextField(Search, text: $search) WrapperView(text: $text, highlight: search) .frame(height: 300) } } } private struct WrapperView: NSViewRepresentable { @Binding var text: String var highlight: String func makeNSView(context: Context) -> CustomTextView { let view = CustomTextView() return view } func updateNSView(_ nsView: CustomTextView, context: Context) { nsView.setText(text) nsView.s
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’26
Reply to TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
I'd like to start with pointing you the following pure SwiftUI TextEditor sample, which may be good enough if your intent is to highlight a range of text (and do basic text editing) in a SwiftUI app: Building rich SwiftUI text experiences. If you do need TextKit 2 for other reasons, I'd suggest that you provide a minimal project that demonstrates the issue for folks to take a closer look. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’26
Reply to Extended Runtime API - Health Monitoring
This post discusses using a Workout session to maintain background access. This is a very poor user experience as far as battery life goes but many apps are resorting to it for lack of better alternative. Yeah, but I'd say that, because of the limited resources, continuously running a watchOS app in background hasn't been a supported use case from day one. Folks who are exploring how to achieve that goal might consider shifting the direction. Also to be clear, using an active workout session in a non-workout app to extend the background execution time risks an App Review rejection. This post discusses getting crashes on WatchOS 26 for exhausting CPU time with background HKObserverQueries, I too am seeing this despite calling the completion handler immediately and not running any processing code, is there any solution? In that case, I can ony suggest that yo file a feedback report, as mentioned in the post. If you already have one, please share so I can check the status. I see folks reporting this issue from t
Mar ’26
TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
I’m embedding an NSTextView (TextKit 2) inside a SwiftUI app using NSViewRepresentable. I’m trying to highlight dynamic subranges (changing as the user types) by providing per-range rendering attributes via NSTextLayoutManager’s rendering-attributes mechanism. The issue: the highlight is unreliable. Often, the highlight doesn’t appear at all even though the delegate/data source is returning attributes for the expected range. Sometimes it appears once, but then it stops updating even when the underlying “highlight range” changes. This feels related to SwiftUI - AppKit layout issue when using NSViewRepresentable (as said in https://developer.apple.com/documentation/swiftui/nsviewrepresentable). What I’ve tried Updating the state that drives the highlight range and invalidating layout fragments / asking for relayout Ensuring all updates happen on the main thread. Calling setNeedsDisplay(_:) on the NSViewRepresentable’s underlying view. Toggling the SwiftUI view identity (e.g.
3
0
327
Mar ’26
Push notifications not delivered over Wi-Fi with includeAllNetworks = true regardless of excludeAPNS setting
We have a VPN app that uses NEPacketTunnelProvider with includeAllNetworks = true. We've encountered an issue where push notifications are not delivered over Wi-Fi while the tunnel is active in a pre-MFA quarantine state (tunnel is up but traffic is blocked on server side), regardless of whether excludeAPNS is set to true or false. Observed behavior Wi-Fi excludeAPNS = true - Notifications not delivered Wi-Fi excludeAPNS = false - Notifications not delivered Cellular excludeAPNS = true - Notifications delivered Cellular excludeAPNS = false - Notifications not delivered On cellular, the behavior matches our expectations: setting excludeAPNS = true allows APNS traffic to bypass the tunnel and notifications arrive; setting it to false routes APNS through the tunnel and notifications are blocked (as expected for a non-forwarding tunnel). On Wi-Fi, notifications fail to deliver in both cases. Our question Is this expected behavior when includeAllNetworks is enabled on Wi-Fi, or is this a known issue / bug with APN
7
0
552
Mar ’26
How do you make a resizable segmented control in SwiftUI for macOS?
In SwiftUI for macOS, how do I configure a Picker as a segmented control to have a flexible width? This design pattern is present in Xcode 26 at the top of the sidebar and inspector panel. I can't figure out the combination of view modifiers to achieve a similar look. import SwiftUI struct ContentView: View { @State private var selection = 0 var body: some View { VStack { Picker(, selection: $selection) { Image(systemName: doc) Image(systemName: folder) Image(systemName: gear) Image(systemName: globe) .frame(maxWidth: .infinity) // Doesn't do anything. } .labelsHidden() .pickerStyle(.segmented) .frame(maxWidth: .infinity) // Doesn't affect segment sizes. Spacer() } } } I want the entire Picker to fill the width and for each segment to be of equal widths. How? In AppKit I would use AutoLayout for the flexible width and NSSegmentedControl.segmentDistribution for the segment widths. Is there a SwiftUI equivalent? macOS 26 / Xcode 26.3
Topic: UI Frameworks SubTopic: SwiftUI Tags:
0
0
118
Mar ’26
Notarization submissions stuck "In Progress" — native macOS app with Sparkle.framework (12+ attempts)
I'm submitting a native macOS app (Swift/SwiftUI, arm64) that includes Sparkle.framework for auto-updates. All binaries are signed with a Developer ID Application certificate using --options runtime and --timestamp. I've submitted 12+ times over the past two days, both from local notarytool submit and from GitHub Actions CI. Every submission uploads successfully and returns a valid submission ID, but then stays at In Progress indefinitely — none have resolved to Accepted or Invalid. Two early submissions did eventually come back Invalid — Apple's rejection log showed the Sparkle nested binaries had ad-hoc signatures (they were being signed as individual Mach-O files instead of bundle directories). I fixed this with proper inside-out bundle signing. Since the fix, local codesign --verify --deep --strict passes cleanly, but all ~10 subsequent submissions remain stuck at In Progress. 9UT54V24XG Would appreciate any guidance, or if someone from the notary team could check our queue. Happy to provide spec
3
0
174
Mar ’26
Reply to All notarization submissions stuck "In Progress" for 24+ hours — first-time Electron app
Experiencing the same issue here — native macOS (Swift/SwiftUI) app with Sparkle.framework, signed with Developer ID Application certificate using --options runtime and --timestamp on all binaries. We've submitted 12+ times over the past two days, both from local notarytool submit and from GitHub Actions CI. Two early submissions eventually came back Invalid (Sparkle nested binaries needed proper bundle-level signing rather than file-level). After fixing that, codesign --verify --deep --strict passes cleanly on every binary in the bundle. But every submission since the fix — about 10 of them — has been stuck at In Progress indefinitely. We're using App Store Connect API key auth (--key / --key-id / --issuer), and the submissions upload successfully with valid submission IDs. They just never resolve. Team ID: 9UT54V24XG Would appreciate any guidance or if someone from Apple could take a look at our queue. Happy to provide submission IDs if that helps.
Topic: Code Signing SubTopic: Notarization Tags:
Mar ’26
Metal Shader inside Swift Package not found?
Hello everyone! I am trying to wrap a ViewModifier inside a Swift Package that bundles a metal shader file to be used in the modifier. Everything works as expected in the Preview, in the Simulator and on a real device for iOS. It also works in Preview and in the Simulator for tvOS but not on a real AppleTV. I have tried this on a 4th generation Apple TV running tvOS 26.3 using Xcode 26.2.0. Xcode logs the following: The metallib is processed and exists in the bundle. Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: visible function not loaded Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: visible function not loaded Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: v
0
0
506
Mar ’26
Detect closing of tab (NSWindowTab) in WindowGroup
I have a SwiftUI app displaying tabbed windows (as NSWindowTab) in a WindowGroup: import SwiftUI @main struct TabTestApp: App { var body: some Scene { WindowGroup{ ContentView() // Hasn't any content of relevance to this question. }.commands{ CommandGroup(after: .newItem) { Button(New Tab) { guard let currentWindow = NSApp.keyWindow, let windowController = currentWindow.windowController else { return } windowController.newWindowForTab(nil) guard let newWindow = NSApp.keyWindow else { return } if currentWindow != newWindow { currentWindow.addTabbedWindow(newWindow, ordered: .above) } }.keyboardShortcut(.init(t, modifiers: [.command])) } } } } Is there a way to detect the closing of one or multiple tabs, e.g. when the user clicks on the tab bar's Close Other Tabs option or pushes CMD + W in order to ask the user whether he or she wants to save changes? What I've tried to no avail: Intercept windowWillClose👉Won't be called if a single tab within a window is closed (but only once the last tab o
0
0
86
Mar ’26
Reply to Possible Bug - Hover Effects/Spatial Event Compatibilty with PSVR2 Controllers?
The hover effects feature introduced in visionOS 26 represents a significant enhancement for creating immersive experiences, allowing users to interact with virtual objects using spatial gestures. However, the behavior of these gestures, particularly with the PSVR 2 controllers, can indeed vary based on how they are integrated into different types of views and applications. Clarification on Hover Effects and PSVR 2 Controllers Hover Effects in VisionOS: Hover effects are designed to provide feedback when a user's gaze is directed towards a virtual object. This is akin to a mouse hover on a desktop and can trigger spatial events or visual highlights. Controller Gestures: On the PSVR 2, traditional button presses (like pulling the trigger) are well-supported across various interfaces, including SwiftUI. However, gaze-based interactions like hover effects require additional handling to map spatial gestures to these events. Discrepancies in Behavior Sample Application Behavior: The sample you referenced
Topic: Spatial Computing SubTopic: General Tags:
Mar ’26
tvOS Simulator (also Xcode Canvas) Mapview Artifacts After Xcode Crash (26.3)
Have a peculiar problem I'm not able to solve. Working on an app with a mapview in the max zoomed out globe level. For some reason this morning Xcode froze/crashed when I was working and I had to force quit to get it back up. Then a new issue of graphical artifacts on the space section of the Mapview showed up. This Tuesday has now been spent in full on trying to solve this to no avail. I created a new project for iOS/iPadOS and added a similar map implementation. It works fine. I used Claude to help me after a few reinstalls of Xcode with this. I asked claude to summarize - this is what has been done: Claude generative AI summary starts here---------- Here's a complete summary of everything attempted: The Problem SwiftUI tvOS app with MapKit globe view showing severe rendering artifacts — corrupted pixels surrounding the globe. Started after Xcode crashed while the tvOS simulator was actively running. iOS simulator, macOS Maps app, and all native apps work perfectly. Only tvOS simulator MapKit is af
Replies
2
Boosts
0
Views
323
Activity
Mar ’26
Reply to Extended Runtime API - Health Monitoring
Ok, thank you Ziqiao for the detailed & quick response, most appreciated. Folks who are exploring how to achieve that goal might consider shifting the direction. I agree... I just hope we can either clarify better alternative for those apps, or if not available, provide input to future APIs. In that case, I can ony suggest that yo file a feedback report, as mentioned in the post. If you already have one, please share so I can check the status. I see folks reporting this issue from time to time, but haven't yet seen them sharing their report. I have filed a feedback FB22115840 and created a sample project and provided a crash report. I think all the code is correct in terms of calling of completionHandler() and I've tried to simplify the project🤞🤞 really hope this is useful as would love to see a fix soon. The SwiftUI equivalent is backgroundTask(_:action:). I read the guidance but I still struggle to understand if on WatchOS, when using that API, you can avoid using a @WKExtensionDelegateAdapto
Replies
Boosts
Views
Activity
Mar ’26
Problems with iPad Pro M4 13 inch
We have an iOS/iPadOS (mixed use of UIKit/SwiftUI) app on the App Store since a couple of years. Over the last month or so, we are receiving many user reports complaining about app freezing and behaving very bad generally. The common denominator for all of these users (~10) is that they are using iPad Pro M4, 13 inch, and they are on at least iPadOS 26.2 - some have updated to 26.2.1, 26.3 etc but the problems remain. Some of the users say that they were using our app normally, until the release of 26.2, or perhaps 26.2.1, from when the problems seem to have started. Some report the problems that go away when they use another WiFi, or when they hold the device in portrait mode (it seems that many complaints seem to suggest that the problem is in when holding the device in landscape). Other say the app works fine if they start it without network enabled, and after enabling network, continue in the app. While we currently do not have an iPad Pro M4 13 inch to test with, we haven't been able to reproduc
Replies
3
Boosts
0
Views
446
Activity
Mar ’26
Reply to TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
Thanks for the quick response. I’d prefer to use a pure SwiftUI text solution, but at the moment I need TextKit 2 for features SwiftUI still doesn’t expose—real-time syntax highlighting, paragraphStyle handling, tracking visibleRect changes, and related editor behaviors. Below is a minimal example showing how I’m using NSTextLayoutManager rendering attributes for a dynamic highlight. import SwiftUI struct RATestView: View { @State private var text = TextKit 2 rendering highlight demo. Type something and watch highlight update. @State private var search = highlight var body: some View { VStack { TextField(Search, text: $search) WrapperView(text: $text, highlight: search) .frame(height: 300) } } } private struct WrapperView: NSViewRepresentable { @Binding var text: String var highlight: String func makeNSView(context: Context) -> CustomTextView { let view = CustomTextView() return view } func updateNSView(_ nsView: CustomTextView, context: Context) { nsView.setText(text) nsView.s
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’26
Reply to Mac App Review Sudden Delays?
These are 4 major changes that I have seen for Mac App Store review since the end of the last year. Quick rejection based on silly claims Wait time from 1-to-2 days to 4-to-5 days Reviewers ignoring rejection replies StoreKit 2 no longer working property in SwiftUI
Replies
Boosts
Views
Activity
Mar ’26
Reply to TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
I'd like to start with pointing you the following pure SwiftUI TextEditor sample, which may be good enough if your intent is to highlight a range of text (and do basic text editing) in a SwiftUI app: Building rich SwiftUI text experiences. If you do need TextKit 2 for other reasons, I'd suggest that you provide a minimal project that demonstrates the issue for folks to take a closer look. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’26
Reply to Extended Runtime API - Health Monitoring
This post discusses using a Workout session to maintain background access. This is a very poor user experience as far as battery life goes but many apps are resorting to it for lack of better alternative. Yeah, but I'd say that, because of the limited resources, continuously running a watchOS app in background hasn't been a supported use case from day one. Folks who are exploring how to achieve that goal might consider shifting the direction. Also to be clear, using an active workout session in a non-workout app to extend the background execution time risks an App Review rejection. This post discusses getting crashes on WatchOS 26 for exhausting CPU time with background HKObserverQueries, I too am seeing this despite calling the completion handler immediately and not running any processing code, is there any solution? In that case, I can ony suggest that yo file a feedback report, as mentioned in the post. If you already have one, please share so I can check the status. I see folks reporting this issue from t
Replies
Boosts
Views
Activity
Mar ’26
TextKit 2 + SwiftUI (NSViewRepresentable): NSTextLayoutManager rendering attributes don’t reliably draw/update
I’m embedding an NSTextView (TextKit 2) inside a SwiftUI app using NSViewRepresentable. I’m trying to highlight dynamic subranges (changing as the user types) by providing per-range rendering attributes via NSTextLayoutManager’s rendering-attributes mechanism. The issue: the highlight is unreliable. Often, the highlight doesn’t appear at all even though the delegate/data source is returning attributes for the expected range. Sometimes it appears once, but then it stops updating even when the underlying “highlight range” changes. This feels related to SwiftUI - AppKit layout issue when using NSViewRepresentable (as said in https://developer.apple.com/documentation/swiftui/nsviewrepresentable). What I’ve tried Updating the state that drives the highlight range and invalidating layout fragments / asking for relayout Ensuring all updates happen on the main thread. Calling setNeedsDisplay(_:) on the NSViewRepresentable’s underlying view. Toggling the SwiftUI view identity (e.g.
Replies
3
Boosts
0
Views
327
Activity
Mar ’26
Push notifications not delivered over Wi-Fi with includeAllNetworks = true regardless of excludeAPNS setting
We have a VPN app that uses NEPacketTunnelProvider with includeAllNetworks = true. We've encountered an issue where push notifications are not delivered over Wi-Fi while the tunnel is active in a pre-MFA quarantine state (tunnel is up but traffic is blocked on server side), regardless of whether excludeAPNS is set to true or false. Observed behavior Wi-Fi excludeAPNS = true - Notifications not delivered Wi-Fi excludeAPNS = false - Notifications not delivered Cellular excludeAPNS = true - Notifications delivered Cellular excludeAPNS = false - Notifications not delivered On cellular, the behavior matches our expectations: setting excludeAPNS = true allows APNS traffic to bypass the tunnel and notifications arrive; setting it to false routes APNS through the tunnel and notifications are blocked (as expected for a non-forwarding tunnel). On Wi-Fi, notifications fail to deliver in both cases. Our question Is this expected behavior when includeAllNetworks is enabled on Wi-Fi, or is this a known issue / bug with APN
Replies
7
Boosts
0
Views
552
Activity
Mar ’26
How do you make a resizable segmented control in SwiftUI for macOS?
In SwiftUI for macOS, how do I configure a Picker as a segmented control to have a flexible width? This design pattern is present in Xcode 26 at the top of the sidebar and inspector panel. I can't figure out the combination of view modifiers to achieve a similar look. import SwiftUI struct ContentView: View { @State private var selection = 0 var body: some View { VStack { Picker(, selection: $selection) { Image(systemName: doc) Image(systemName: folder) Image(systemName: gear) Image(systemName: globe) .frame(maxWidth: .infinity) // Doesn't do anything. } .labelsHidden() .pickerStyle(.segmented) .frame(maxWidth: .infinity) // Doesn't affect segment sizes. Spacer() } } } I want the entire Picker to fill the width and for each segment to be of equal widths. How? In AppKit I would use AutoLayout for the flexible width and NSSegmentedControl.segmentDistribution for the segment widths. Is there a SwiftUI equivalent? macOS 26 / Xcode 26.3
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
0
Boosts
0
Views
118
Activity
Mar ’26
Notarization submissions stuck "In Progress" — native macOS app with Sparkle.framework (12+ attempts)
I'm submitting a native macOS app (Swift/SwiftUI, arm64) that includes Sparkle.framework for auto-updates. All binaries are signed with a Developer ID Application certificate using --options runtime and --timestamp. I've submitted 12+ times over the past two days, both from local notarytool submit and from GitHub Actions CI. Every submission uploads successfully and returns a valid submission ID, but then stays at In Progress indefinitely — none have resolved to Accepted or Invalid. Two early submissions did eventually come back Invalid — Apple's rejection log showed the Sparkle nested binaries had ad-hoc signatures (they were being signed as individual Mach-O files instead of bundle directories). I fixed this with proper inside-out bundle signing. Since the fix, local codesign --verify --deep --strict passes cleanly, but all ~10 subsequent submissions remain stuck at In Progress. 9UT54V24XG Would appreciate any guidance, or if someone from the notary team could check our queue. Happy to provide spec
Replies
3
Boosts
0
Views
174
Activity
Mar ’26
Reply to All notarization submissions stuck "In Progress" for 24+ hours — first-time Electron app
Experiencing the same issue here — native macOS (Swift/SwiftUI) app with Sparkle.framework, signed with Developer ID Application certificate using --options runtime and --timestamp on all binaries. We've submitted 12+ times over the past two days, both from local notarytool submit and from GitHub Actions CI. Two early submissions eventually came back Invalid (Sparkle nested binaries needed proper bundle-level signing rather than file-level). After fixing that, codesign --verify --deep --strict passes cleanly on every binary in the bundle. But every submission since the fix — about 10 of them — has been stuck at In Progress indefinitely. We're using App Store Connect API key auth (--key / --key-id / --issuer), and the submissions upload successfully with valid submission IDs. They just never resolve. Team ID: 9UT54V24XG Would appreciate any guidance or if someone from Apple could take a look at our queue. Happy to provide submission IDs if that helps.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Mar ’26
Metal Shader inside Swift Package not found?
Hello everyone! I am trying to wrap a ViewModifier inside a Swift Package that bundles a metal shader file to be used in the modifier. Everything works as expected in the Preview, in the Simulator and on a real device for iOS. It also works in Preview and in the Simulator for tvOS but not on a real AppleTV. I have tried this on a 4th generation Apple TV running tvOS 26.3 using Xcode 26.2.0. Xcode logs the following: The metallib is processed and exists in the bundle. Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: visible function not loaded Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: visible function not loaded Compiler failed to build request precondition failure: pipeline error: custom_effect-fg2a5cia7fmha4: error: unresolved visible function reference: custom_fn Reason: v
Replies
0
Boosts
0
Views
506
Activity
Mar ’26
Detect closing of tab (NSWindowTab) in WindowGroup
I have a SwiftUI app displaying tabbed windows (as NSWindowTab) in a WindowGroup: import SwiftUI @main struct TabTestApp: App { var body: some Scene { WindowGroup{ ContentView() // Hasn't any content of relevance to this question. }.commands{ CommandGroup(after: .newItem) { Button(New Tab) { guard let currentWindow = NSApp.keyWindow, let windowController = currentWindow.windowController else { return } windowController.newWindowForTab(nil) guard let newWindow = NSApp.keyWindow else { return } if currentWindow != newWindow { currentWindow.addTabbedWindow(newWindow, ordered: .above) } }.keyboardShortcut(.init(t, modifiers: [.command])) } } } } Is there a way to detect the closing of one or multiple tabs, e.g. when the user clicks on the tab bar's Close Other Tabs option or pushes CMD + W in order to ask the user whether he or she wants to save changes? What I've tried to no avail: Intercept windowWillClose👉Won't be called if a single tab within a window is closed (but only once the last tab o
Replies
0
Boosts
0
Views
86
Activity
Mar ’26
Reply to Possible Bug - Hover Effects/Spatial Event Compatibilty with PSVR2 Controllers?
The hover effects feature introduced in visionOS 26 represents a significant enhancement for creating immersive experiences, allowing users to interact with virtual objects using spatial gestures. However, the behavior of these gestures, particularly with the PSVR 2 controllers, can indeed vary based on how they are integrated into different types of views and applications. Clarification on Hover Effects and PSVR 2 Controllers Hover Effects in VisionOS: Hover effects are designed to provide feedback when a user's gaze is directed towards a virtual object. This is akin to a mouse hover on a desktop and can trigger spatial events or visual highlights. Controller Gestures: On the PSVR 2, traditional button presses (like pulling the trigger) are well-supported across various interfaces, including SwiftUI. However, gaze-based interactions like hover effects require additional handling to map spatial gestures to these events. Discrepancies in Behavior Sample Application Behavior: The sample you referenced
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’26