Search results for

SwiftUI List performance

50,609 results found

Post

Replies

Boosts

Views

Activity

Reply to System Panic with IOUserSCSIParallelInterfaceController during Dispatch Queue Configuration
Hi Kevin, Thank you for your previous guidance. We have shifted our driver architecture to the UserProcessBundledParallelTasks model with Shared Command/Response Buffers to optimize I/O performance. But, we are encountering a persistent Kernel Panic / DEXT Crash (Corpse) immediately after switching to the Bundled mode, preventing the target discovery and initialization sequence from completing, while the legacy mode (UserProcessParallelTask) is rock-solid and stable. Implementation Details: Memory Mapping: Successfully implemented UserMapBundledParallelTaskCommandAndResponseBuffers. DEXT correctly obtains the virtual addresses for both buffers. Dispatching: Inside UserProcessBundledParallelTasks, we iterate through the parallelRequestSlotIndices, reading from the shared command buffer and dispatching tasks to the hardware. Completion: Upon hardware completion, we populate the shared response buffer in the asynchronous path (ISR/Poll) and invoke BundledParallelTaskCompletion with the corresponding OSA
Topic: App & System Services SubTopic: Drivers Tags:
Jan ’26
Reply to Unable to run embedded binary due to quarantine
Thank you so much for answering! Contents/Resources is not the right place for a helper tool. Thanks, I'll try to move it. This is historically the place I've seen such tools to be placed (including Apple software in the past - but we're talking about 10-15 years ago) and I just kept putting the binaries there... But you are right, when I think about it, it is probably incorrect place. I suspect that the wrapper applied by the pp tool is actually unpacking code into the temporary directory and then running that. Huh! That did not occur to me! I suspected that this was due to App Translocation that the binary was launched from a temporary location as a result of the quarantine... So I did not even check the path! I've used FSMonitor (app for displaying fsevents in real time) and indeed, this is what happens. I fully understand this is not compatible with App Sandbox, so I will need to find another solution. Embedding Perl interpreter was on my list of possible workarounds, so I'll need to look into th
Topic: Code Signing SubTopic: General Tags:
Jan ’26
Reply to Choppy minimized search bar animation
Dear @DTS Engineer, thank you very much for your continued effort on this matter! Truly appreciate it! I use Xcode Version 26.2 (17C52) and experience this choppy animation in both SwiftUI Canvas and an actual device running iOS26.2. At the same time, I would like to point out that the animation indeed runs smoothly when the TabView is commented out / not used at all (as perhaps in your code). It does not, however, when the TabView is used (as in my initial code). #Preview { if #available(iOS 26, *) { TabView { // Does this cause a problem? Tab { SwiftUIView() } label: { Label(Test, systemImage: calendar) } } } else { // Fallback on earlier versions } } Hopefully this helps to narrow down the source of the issue!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
Camera Permissions Popup
We have a very strange issue that I am trying to solve or find the best practice for. We have a SwiftUI View that uses the Camera to preview. So as suggested in Apples Docs we check authorisation status and then if it's not determined we request authorisation. We also have the privacy entry in the info.plist case .notDetermined: AVCaptureDevice.requestAccess(for: .video) { accessStatusAuthorised in if !accessStatusAuthorised { self.cameraStatus = .notAuthorised } else { self.isAuthorized = true self.cameraStatus = .authorised self.startCameraSession(cameraPosition: cameraPosition) } } case .restricted: cameraStatus = .notAuthorised isAuthorized = false case .denied: cameraStatus = .notAuthorised isAuthorized = false case .authorized: cameraStatus = .authorised isAuthorized = true startCameraSession(cameraPosition: cameraPosition) break @unknown default: isAuthorized = true cameraStatus = .notAuthorised } However when we call this code it freezes the Camera feed, even when allow has been tapped. Howev
1
0
145
Jan ’26
Reply to Multi-machine Code Signing
After playing with builds and code signing over this weekend, I'm now not sure my original idea about this failure is correct. It's rather something about rebooting the machine that makes the magic work. If I work on a source tree, editing files, checking things into and out of source code control, performing builds or parts of builds, etc., code signing the final build often fails. If I reboot the system and make the full build right away, before doing anything else, it works. Some tool that I use must be corrupting it. Unless someone knows ways to interfere with code signing that might align with this, I will take this away and try to gather more information. Thanks for your help so far.
Jan ’26
Reply to Virtual Machine UDID Changes in macOS 15: Looking for Guidance on Development Workflow
We are using an open-source project called UTM (https://github.com/utmapp/UTM) for managing our virtual machine infra. The way how cloning works in our current workflow is by taking an existing visual machine (a UTM bundle file) and copying it with cp command and updating the metadata to avoid clashes with existing virtual machines like so cp -cR $template_file $clone_file xmlstarlet ed --inplace -u '//key[.=Name]/following-sibling::string[1]' -v $clone_name ${clone_file}/config.plist xmlstarlet ed --inplace -u '//key[.=MacAddress]/following-sibling::string[1]' -v $new_mac_address ${clone_file}/config.plist After that, the newly copied virtual machine file is opened with UTM app with open command open -a UTM $clone_file It appears in the list of registered virtual machines and it's booted up. So I suspect that the UTM app is just opening the virtual machine and treating it as a separate entity. However, this approach allowed us to preserve provisioning UDID so far. There is one curious detail that we
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’26
Reply to JavaScript/Swift Interoperability
If you have a suggestion, you should raise it at: https://feedbackassistant.apple.com/ When doing so, I recommend you list the specific APIs you want, and the justification for them. A suggestion that Apple just implement some of the missing APIs won't get very far.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’26
https://stackoverflow.com/questions/79865253/watchos-swiftui-ui-redraws-are-delayed-in-always-on-power-saving-mode-despite
I'm working on a watchOS app using SwiftUI that updates its UI based on regular, time-driven logic. On a real Apple Watch, after the app has been running for ~1 minute, the device enters Always-On / power-saving display mode (screen dimmed, wrist down). From that point on, SwiftUI UI updates become noticeably delayed. The underlying logic continues to run correctly, but the UI only redraws sporadically and often catches up once the screen becomes fully active again. The app is running in workout mode, which keeps it alive and maintains WatchConnectivity, but this does not prevent UI redraw throttling. Below is a minimal reproducible example that demonstrates the issue. PlaybackModel.swift import SwiftUI @MainActor final class PlaybackModel: ObservableObject { @Published var beat: Int = 0 private var timer: Timer? func start() { timer?.invalidate() timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { _ in Task { @MainActor in self.beat += 1 } } } func stop() { timer?.
1
0
117
Jan ’26
Reply to Choppy minimized search bar animation
Dear @DTS Engineer, Thank you for your reply and suggested way forward. I reduced the code to the minimum for further testing purposes: struct SwiftUIView: View { @State var searchQuery: String = var body: some View { NavigationStack { ScrollView { Text(Test) } .navigationTitle(Test) } .searchable(text: $searchQuery) .searchToolbarBehavior(.minimize) } } #Preview { if #available(iOS 26, *) { TabView { Tab { SwiftUIView() } label: { Label(Test, systemImage: calendar) } } } else { // Fallback on earlier versions } } I did not remove .searchable as per your suggestion since without it the .searchToolbarBehavior(.minimize) does not appear to have any effect (the search button is simply not shown). The code above still leads to the same choppy animation as demonstrated in my initial message. As further testing, I tried to extract the NavigationStack view to a separate view (similarly to here), and to remove ScrollView or replace it with a List, but to no success. Hopefully this is helpful.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
[SwiftUI][DragDrop][iPadOS] Drop into TabView Sidebar Tab not triggering. How to debug?
Are there tools to inspect why a drag-and-drop drop is not triggering in a SwiftUI app? I've declared .draggable on the dragging view, and .dropDestination on the receiving TabContent Tab view. This combination of modifiers is working on a smaller demo app that I have, but not on my more complex one. Is there a means to debug this in SwiftUI? I'd like to see if the drag-and-drop pasteboard actually has what I think it should have on it. Notably: TabContent has a far more restricted list of modifiers that can be used on it.
0
0
92
Jan ’26
Persisting User Settings with SwiftData
I was wondering what the recommended way is to persist user settings with SwiftData? It seems the SwiftData API is focused around querying for multiple objects, but what if you just want one UserSettings object that is persisted across devices say for example to store the user's age or sorting preferences. Do we just create one object and then query for it or is there a better way of doing this? Right now I am just creating: import SwiftData @Model final class UserSettings { var age: Int = 0 var sortAtoZ: Bool = true init(age: Int = 0, sortAtoZ: Bool = true) { self.age = age self.sortAtoZ = sortAtoZ } } In my view I am doing as follows: import SwiftUI import SwiftData struct SettingsView: View { @Environment(.modelContext) var context @Query var settings: [UserSettings] var body: some View { ForEach(settings) { setting in let bSetting = Bindable(setting) Toggle(Sort A-Z, isOn: bSetting.sortAtoZ) TextField(Age, value: bSetting.age, format: .number) } .onAppear { if settings.isEmpty { context.insert(Us
3
0
422
Jan ’26
DeviceActivityReportExtension: NSExtensionPrincipalClass required by App Store but rejected at runtime
I'm experiencing a contradictory validation issue with DeviceActivityReportExtension that creates an impossible situation: The Problem: Without NSExtensionPrincipalClass in Info.plist → App Store Connect rejects upload with: Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found With NSExtensionPrincipalClass → Local install fails with: defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.deviceactivityui.report-extension Setup: Extension point: com.apple.deviceactivityui.report-extension Using SwiftUI with @main attribute and DeviceActivityReportExtension protocol Xcode 16.2, iOS 17.6 deployment target Code structure: @main struct SpoolReport: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Report scenes here } } The extension builds and runs perfectly without NSExtensionPrincipalClass, but cannot be uploaded to App Store Connect. Adding the key
7
0
488
Jan ’26
hapticpatternlibrary.plist error with Text entry fields in Simulator only
When I have a TextField or TextEditor, tapping into it produces these two console entries about 18 times each: CHHapticPattern.mm:487 +[CHHapticPattern patternForKey:error:]: Failed to read pattern library data: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnderlyingError=0x600000ca1b30 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}} <_UIKBFeedbackGenerator: 0x600003505290>: Error creating CHHapticPattern: Error Domain=NSCocoaErrorDomain Code=260 The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file. UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnd
2
0
379
Jan ’26
Choppy minimized search bar animation
The new .searchToolbarBehavior(.minimized) modifier leads to a choppy animation both on device and SwiftUI canvas (iOS 26.2): I assume this is not the intended behaviour (reported under FB21572657), but since I almost never receive any feedback to my reports, I wanted to see also here, whether you experience the same, or perhaps I use the modifier incorrectly? struct SwiftUIView: View { @State var isSearchPresented: Bool = false @State var searchQuery: String = var body: some View { TabView { Tab { NavigationStack { ScrollView { Text(isSearchPresented.description) } .navigationTitle(Test) } .searchable(text: $searchQuery, isPresented: $isSearchPresented) .searchToolbarBehavior(.minimize) // **Choppy animation comes from here?** } label: { Label(Test, systemImage: calendar) } Tab { Text(123) } label: { Label(123, systemImage: globe) } } } } #Preview { if #available(iOS 26, *) { SwiftUIView() } else { // Fallback on earlier versions } }
4
0
337
Jan ’26