Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to .glassEffect() renders dark on device but works on simulator - TestFlight doesn't fix it
Hello Jmckinney, The darkened color of the button during Dark Mode is expected behavior. When placed in front of a brightly-colored gradient like in your test view, or a lightly-gray-colored background like in your sample app view, this will be the result. To fully support Dark Mode, please consult the Choose adaptive colors for your UI section of the Supporting Dark Mode in your interface guide. (The overall guide is for UIKit, but there are general principles and practices that are also applicable for SwiftUI.) The WWDC 2019 talk Implementing Dark Mode on iOS might also be helpful. Finally, the Dark Mode entry in the human interface guidelines is definitely worth a look. Thank you for your patience, Richard Yeh  Developer Technical Support
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
.glassEffect() renders dark on device but works on simulator - TestFlight doesn't fix it
iOS 26 SwiftUI .glassEffect() renders dark/gray on physical device - TestFlight doesn't fix it .glassEffect() renders as dark/muddy gray on my physical iPhone instead of the light frosted glass like Apple Music's tab bar. What I've confirmed: Same code works perfectly on iOS Simulator Apple Music and other Apple apps show correct Liquid Glass on same device Brand new Xcode project with just .glassEffect() also renders dark TestFlight build (App Store signing) has the SAME problem - still dark/gray This rules out developer signing vs App Store signing as the cause What I've tried: Clean build, delete derived data, reinstall app Completely reinstalled Xcode All accessibility settings correct (Reduce Transparency OFF, Liquid Glass set to Clear) Disabled Metal diagnostics Debug and Release builds Added window configuration for Extended sRGB/P3 color space Added AppDelegate with configureWindowForLiquidGlass() Tried .preferredColorScheme(nil) Tried background animation to force live rendering Environment:
5
0
295
2w
Reply to My app seems to cause Time Machine errors
I set the PDFDocument to nil when I close it. Maybe review how you're doing that. The NSDocument teardown process is not straightforward. As the documentation says, the close() method doesn't always get called. This is a general problem throughout the UI APIs. The init, setup, layout, display, hide, teardown, dealloc process can be quite delicate. This is most apparent with NSDocument, where everything either happens at an inconvenient time, or simply not at all. It's better to rely on major events like NSWindowDelegate windowWillClose to perform your teardown. Make sure your teardown logic can be safely called repeatedly, and then call it again in places like close() and dealloc. The Debug Memory Graph tool is very useful. Just run your app normally. Open a couple of documents and close them. Then hit Debug Memory Graph. You may be surprised at what objects still exist at that point.
Topic: App & System Services SubTopic: Core OS Tags:
2w
Document Type Export / Import in Xcode - Shared via Messages
I’ve created a document type for my app and set it up in the Info Configuration in Xcode. This all works as expected: Implemented with the Transferrable API and ShareLink, I can share an app’s file via the Files app or Notes and then import the file via a Share extension and the fileImport swiftUI api. My question is regarding Messages, specifically. It appears as a ShareLink option and I’m able to send my app’s document type via a message, but I’m unable to open it or share it (internally, with my app), other than being able to forward or delete it. If I copy the file, I can’t access it within my app (it’s still stored in the Messages private bundle) and startAccessingSecurityScopedResource returns false as expected. The message does detect the right icon, so it’s recognizing the custom document type. If my Share Extension, exported document type, and transferable implementation is configured correctly, should I be able to open a file for my app shared via Messages? Is this an allowed action? I get
1
0
107
2w
NSFileSandboxingRequestRelatedItemExtension: Failed to issue extension
Hi there, I have an SwiftUI app that opens a user selected audio file (wave). For each audio file an additional file exists containing events that were extracted from the audio file. This additional file has the same filename and uses the extension bcCalls. I load the audio file using FileImporter view modifier and within access the audio file with a security scoped bookmark. That works well. After loading the audio I create a CallsSidecar NSFilePresenter with the url of the audio file. I make the presenter known to the NSFileCoordinator and upon this add it to the FileCoordinator. This fails with NSFileSandboxingRequestRelatedItemExtension: Failed to issue extension for; Error Domain=NSPOSIXErrorDomain Code=3 No such process My Info.plist contains an entry for the document with NSIsRelatedItemType set to YES I am using this kind of FilePresenter code in various live apps developed some years ago. Now when starting from scratch on a fresh macOS26 system with most current Xcode I do not manage to get
7
0
241
2w
Slow rendering List backed by SwiftData @Query
Hello, I've a question about performance when trying to render lots of items coming from SwiftData via a @Query on a SwiftUI List. Here's my setup: // Item.swift: @Model final class Item: Identifiable { var timestamp: Date var isOptionA: Bool init() { self.timestamp = Date() self.isOptionA = Bool.random() } } // Menu.swift enum Menu: String, CaseIterable, Hashable, Identifiable { var id: String { rawValue } case optionA case optionB case all var predicate: Predicate { switch self { case .optionA: return #Predicate { $0.isOptionA } case .optionB: return #Predicate { !$0.isOptionA } case .all: return #Predicate { _ in true } } } } // SlowData.swift @main struct SlowDataApp: App { var sharedModelContainer: ModelContainer = { let schema = Schema([Item.self]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) return try! ModelContainer(for: schema, configurations: [modelConfiguration]) }() var body: some Scene { WindowGroup { ContentView() } .modelCo
10
0
1.8k
2w
iOS 26: Unable to Transition from CallKit Screen to App when remoteHandle is nil or empty string
Hello, I am developing an internal phone application using CallKit. I am experiencing an issue with the behavior of remoteHandle settings in iOS 26 and would appreciate any insights you can provide towards a solution. 1. Problem Description When an iPhone running iOS 26 is in a sleep state and receives a VoIP incoming call where remoteHandle is set to nil or an empty string (@), we are unable to transition to our application (the UIExtension provided by the provider) from the CallKit UI's More (…) button after answering the call. 2. Conditions and Symptoms OS Version: iOS 26 Initial State: iPhone is in a sleep state Call Type: An unsolicited(unknown number) VoIP incoming call where the CXCallUpdate's remoteHandle is set to either nil or [[CXHandle alloc] initWithType:CXHandleTypePhoneNumber value:@] Symptoms: After answering the VoIP call by sliding the button, selecting the More (…) button displayed on the CallKit screen does not launch our application's UIExtension (custom UI), and the iPhone instead stay t
5
0
412
2w
Reply to Zsh kills Python process with plenty of available VM
Just adding a quick follow-up, in case you have some other ideas: I tested with many values of vm_compression_limit, from 0 up to 10^12, but the behaviour when the VMM kills a process is not affected: when the swap size reaches approximately 44GB, the process gets killed. I had a chance to play with this today and I think you're just setting it wrong. You need to set this as a boot argument, so the nvram command looks like this: nvram boot-args=debug= vm_compression_limit=4000000000 With that configuration, I got to ~130GB of memory usage and ~100GB of swap before the process was terminated. You can use nvram -p to print the full list of firmware variables, find your existing boot-args value, then insert it back into the command above to preserve it. Note: It's also possible that boot-args doesn't exist or you can choose to overwrite the value. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
2w
Reply to Unable to find intelgpu_kbl_gt2r0 slice or a compatible one in binary archive
Thanks for the post, this is extremely interesting to me for metal, what version of macOS are you using in what computer that can’t find the slice? I think, the error message Unable to find intelgpu_kbl_gt2r0 slice or a compatible one strongly suggests that it is related to the performance of the app on your Mac running macOS 26.2. This is a specific slice or compilation target for Metal shaders. This file contains precompiled Metal shader code for various graphics hardware configurations. The error means the system couldn't find a version of a shader that's compatible with your specific Intel graphics processor in the precompiled resources? The error message you're seeing is a strong indicator of a graphics-related issue likely impacting performance on your Intel Mac. The specific version of macOS and the applications you are using will determine the scope of the impact and the appropriate troubleshooting steps. I’m not an expert in metal nor I know enough to figure it out. May I ask you to
Topic: Graphics & Games SubTopic: Metal Tags:
2w
App Rejected Again - iPad Issue Despite Removing iPad Support
Hello Developer Community, I'm encountering a persistent issue with app rejections related to iPad compatibility, even after explicitly removing iPad as a supported device family in my Xcode project for the latest submission (Version 1.0.1, Build 11). The Apple Review team continues to test on iPad devices (specifically an iPad Air 5th generation running iPadOS 18.4.1) and rejects the build under Guideline 2.1 - Performance - App Completeness, citing a login issue with demo credentials that leaves the app stuck on the login page. In my previous submission and subsequent resubmission, I clearly targeted only iPhone in the Xcode project settings (Target -> General -> Deployment Info -> Devices: iPhone). I also confirmed that the Targeted Device Families setting reflects only iPhone. Despite these changes, the review team's feedback indicates they are still evaluating the app on an iPad and encountering the same bug. Their response to my clarification about removing iPad support was: Regarding
3
0
188
2w
Crash in swift::_getWitnessTable when passing UITraitBridgedEnvironmentKey
When using UITraitBridgedEnvironmentKey to pass a trait value to the swift environment, it causes a crash when trying to access the value from the environment. The issue seems to be related to how swift uses the UITraitBridgedEnvironmentKey protocol since the crash occurs in swift::_getWitnessTable () from lazy protocol witness table accessor…. It can occur when calling any function that is generic using the UITraitBridgedEnvironmentKey type. I originally encountered the issue when trying to use a UITraitBridgedEnvironmentKey in SwiftUI, but have been able to reproduce the issue with any function with a similar signature. https://developer.apple.com/documentation/swiftui/environmentvalues/subscript(_:)-9zku Steps to Reproduce Requirements for the issue to occur Project with a minimum iOS version of iOS 16 Build the project with Xcode 26 Run on iOS 18 Add the following code to a project and call foo(key: MyCustomTraitKey.self) from anywhere. @available(iOS 17.0, *) func foo(key: K.Type) where
4
0
220
2w
Reply to Buttons become unresponsive after using .windowStyle(.plain) with auto-hiding menu
Hi Michael, Thank you for your previous suggestion to use ViewAttachmentComponent for immersive controls. I've implemented it, However, I'm still facing two critical issues: Issue 1: Buttons in ViewAttachmentComponent Not Responding to Gaze + Pinch The buttons inside my ViewAttachmentComponent are visible and render correctly, but they do not respond to eye gaze + pinch gestures. This defeats the purpose of using visionOS's hands-free interaction model. My Implementation: ImmersiveView.swift (for panoramic images): struct ImmersiveView: View { @EnvironmentObject var model: AppModel @State private var menuEntity: Entity? @State private var isMenuVisible: Bool = true var body: some View { RealityView { content in // Invisible sphere for gesture detection let tapDetector = Entity() tapDetector.name = TapDetector tapDetector.components.set(CollisionComponent(shapes: [.generateSphere(radius: 900)])) tapDetector.components.set(InputTargetComponent()) content.add(tapDetector) // Create control menu using ViewAttachm
Topic: Spatial Computing SubTopic: General Tags:
2w
.safeAreaBar(edge: .bottom), animation lag on appear/disappear
When I try to show/hide the content in .safeAreaBar(edge: .bottom), especially the content with a large height, the background animation of the toolbar is very laggy. iOS 26 RC Feedback ID - FB19768797 import SwiftUI struct ContentView: View { @State private var isShown: Bool = false var body: some View { NavigationStack { Button(Toggle) { withAnimation { isShown.toggle() } } ScrollView(.vertical) { ForEach(0..<100) { index in Text((index)) .padding() .border(.blue) .background(.blue) .frame(maxWidth: .infinity) } } .scrollEdgeEffectStyle(.soft, for: .bottom) .safeAreaBar(edge: .bottom) { if isShown { Text(Safe area bar) .padding(64) .background(.red) } } } } } #Preview { ContentView() }
1
0
191
2w
Reply to Unable to launch tests in Xcode 26
We're also getting the same error ... encountered an error (The test runner hung before establishing connection.) We tried nearly everything, including disabling the Thread Performance Checker in the test scheme shutting down all emulators via xcrun simctl shutdown all and erasing them xcrun simctl erase all force killing any potential hanging simulators beforehand clearing all Simulator logs and caches restarting the machine(s) But this still keeps popping up intermittently. We're using Xcode 26.2. Any tips on what we might want to try next? Thanks!
2w