Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

WWDC21 Demystify SwiftUI question
When the guy was talking about structural identity, starting at about 8:53, he mentioned how the swiftui needs to guarantee that the two views can't swap places, and it does this by looking at the views type structure. It guarantees that the true view will always be an A, and the false view will always be a B. Not sure exactly what he means because views can't swap places like dogs. Why isn't just knowing that some View is shown in true, and another is shown in false, enough for its identity? e.g. The identity could be The view on true vs The view on false, same as his example with The dog on the left vs The dog on the right
0
0
64
Jan ’26
Reply to iOS and Android
Thanks for the great post. That's a common and excellent question for iOS developers looking to expand to Android and hope there are many Android developers in the forums wanting to provide their opinion how they manage the 2 different technologies. Looking forward to see other people’s opinions as mine is based on my development experience. I should be the last person to have an opinion about this based on my job. In my modest and personal opinion not being an Android developer, you will almost certainly need to rewrite the user interface of your app for Android. However, you might be able to reuse a significant portion of your app's core business logic, data models, and networking code written in Swift. iOS Uses UIKit (older) or SwiftUI (newer) for building UIs. Android uses XML layouts with Views (older) or Jetpack Compose (newer) for building UIs. As far as I know there's no direct way to convert SwiftUI or UIKit code into Android XML/Compose, or vice-versa. The underlying rendering engi
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’26
Reply to NSFileProviderPartialContentFetching and high-latency API calls
I'll also add that, given this dynamic: My backend has a high Time To First Byte latency (approx. 3 seconds) but reasonable throughput once the connection is established. ...you might want to consider adding logic that would use the initial NSFileProviderPartialContentFetching call to trigger a full download, instead of only downloading EXACTLY what we specifically request. More broadly, I think you should probably treat NSFileProviderPartialContentFetching as a tool that helps get data to the calling application more quickly, NOT as a firm API contract that you will ONLY retrieve the specific byte range it requested. For large files, your startup latency numbers are high enough that if you REALLY stick to specific byte range retrieval, you're going to end up with absurdly poor performance. Case in point, my back of the envelope map shows that downloading a ~2 GB file at ~128KB every 3s is going to take ~13 hours. Similarly, if you can fetch the full file with minimal additional time/bandwidth, I thi
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’26
Reply to Widget - App may push the list view twice when launched from widget
Thanks for the post. I’m trying to figure out if this is a bug report or there is something you are doing that causing that experience and I can help as tapping an app widget should indeed trigger a Universal Link only once, not twice . The observed behavior of it sometimes firing twice can lead to a poor user experience, causing duplicate actions, navigation, or data processing. The core issue is that the mechanism for opening the Universal Link from the widget, or the app's handling of that link, is being invoked more than once for a single user tap. Would you be able to provide me the app you are using as well as a link to your AASA file. If you're using a Link view in SwiftUI for your widget, ensure there isn't any accidental nesting or multiple Link instances covering the same tap area. Place a breakpoint or detailed logging at the delegate where the app gets called at. Is this method being called twice for a single widget tap? If your app uses SwiftUI's App lifecycle, check if the clos
Jan ’26
How to animate `UIHostingController.view` frame when my View's size changes?
I have a UIHostingController on which I have set: hostingController.sizingOptions = [.intrinsicContentSize] The size of my SwiftUI content changes with animation (I update a @Published property on an ObservableObject inside a withAnimation block). However, I notice that my hostingController.view just jumps to the new frame without animating the change. Question: how can I animate the frame changes in UIHostingController that are caused by sizingOptions = [.intrinsicContentSize]
6
0
302
Jan ’26
macOS Shortcuts App Needs an Export to PDF Feature
I am very new to the macOS Shortcuts application. In my opinion, the documentation is sparse and totally inadequate. The internet seems to be the only method of figuring out how to use this application. I have recently created a shortcut that is working well for me. It has several steps and is too large to fit in the Shortcuts editor window, so I cannot grab a screenshot of it for documenation purposes. I also cannot copy the contents of the editor window and paste them anywhere, such as in a new Note or TextEdit document. I do think Apple should add a means to create a PDF document of the Shortcuts editor window's contents. I went to the official Apple feedback page to leave comments but, irony of ironies, the Shortcuts app is not listed there! I have no idea what I am doing at this point but am excited to learn how to use Shortcuts to automate and simplify tasks that I have to perform frequently. Here's hoping the documentation and features for this application will one day be comprehensiv
2
0
111
Jan ’26
Reply to Foundation Models: Is the .anyOf guide guaranteed to produce a valid string?
anyOf lists all the options in the schema that's presented to the model. anyOf constrains the generation of a string at prediction time. anyOf does both of the above. The answer is 3, both. Since your anyOf isn't actually working, I would suggest removing it from your Tool, and then add your own custom instructions instead. For example: You can ONLY call the tool getCityInfo for the these cities: London, Paris, New York. For questions about all other cities you MUST tell the user Sorry, I can't look up that city. Note I'm lightly yelling at the model in ALL CAPS in the instructions above to help enforce the constraint through prompting alone.
Jan ’26
Accessible Speech Practice App - R Helper Launch
Hi Community, I'm excited to share R Helper, a speech practice app I built with accessibility as the core focus from day one. App Store: https://apps.apple.com/app/speak-r-clearly/id6751442522 WHY I BUILT THIS I personally struggled with R sound pronunciation growing up. It affected my confidence in school and job interviews. That experience taught me how important accessible practice tools are. R Helper helps children and adults practice R sounds with full accessibility support. ACCESSIBILITY FEATURES IMPLEMENTED VoiceOver - complete navigation and feedback Voice Control - hands-free operation Dynamic Type - scales to large accessibility sizes Reduce Motion - respects user preference Dark Mode - user controllable High Contrast compatibility Differentiate Without Color THE CHALLENGE Most speech practice apps ignore accessibility. I wanted to change that and prove that specialized educational apps can be fully accessible. KEY FEATURES Works 100% offline, no internet needed Zero data collection, privacy first G
2
0
1.5k
Jan ’26
DNS Proxy system extension – OSSystemExtensionErrorDomain error 9 “validationFailed” on clean macOS machine
Hi, I’m implementing a macOS DNS Proxy as a system extension and running into a persistent activation error: OSSystemExtensionErrorDomain error 9 (validationFailed) with the message: extension category returned error This happens both on an MDM‑managed Mac and on a completely clean Mac (no MDM, fresh install). Setup macOS: 15.x (clean machine, no MDM) Xcode: 16.x Team ID: AAAAAAA111 (test) Host app bundle ID: com.example.agent.NetShieldProxy DNS Proxy system extension bundle ID: com.example.agent.NetShieldProxy.dnsProxy The DNS Proxy is implemented as a NetworkExtension system extension, not an app extension. Host app entitlements From codesign -d --entitlements :- /Applications/NetShieldProxy.app: xml com.apple.application-identifier AAAAAAA111.com.example.agent.NetShieldProxy com.apple.developer.system-extension.install com.apple.developer.team-identifier AAAAAAA111 com.apple.security.app-sandbox com.apple.security.application-groups group.com.example.NetShieldmac com.apple.security.files.user-selected.
9
0
341
Jan ’26
Reply to Local Network permission on macOS 15 macOS 26: multicast behaves inconsistently and regularly drops
Herewith an update from us on the Local Network Privacy issues that we and our users are experiencing. Over the past period we have done many tests with various combinations of machines and OS'es. Long story short Local Network Security settings seem to behave different between applications that have been either Downloaded, AirDropped or tranferred over a USB Drive. Airdropping the application to the machine gives the expected behavior. Installing the application by downloading it or by installing it over a USB drive gives broken behavior for Local Network Access. Deleting the application and then Airdropping the Application can fix the behavior. Having multiple versions of the same application on the machine breaks Local Network Access. Airdropping gives an additional warning on first launch, so could this be Gatekeeper related? Reproduction These are the steps where you would be able to recreate the issue, we've done this multiple times on multiple different machines on multiple OS versions. The latest OS t
Jan ’26
Reply to System Panic with IOUserSCSIParallelInterfaceController during Dispatch Queue Configuration
Hi Kevin, Thank you for the suggestion. We have performed the over-retaining experiment by adding an extra retain() to the OSAction at the start of the UserProcessBundledParallelTasks loop. Unfortunately, the result remains the same: the DEXT still triggers a Corpse crash immediately upon calling the completion signal in the asynchronous path. As the legacy mode (UserProcessParallelTask) remains 100% stable under our newly serialized queue configuration, we have decided to revert to the legacy path for now to continue our product development while we wait for investigation on the bug report (FB21636775). Any further insights into why the asynchronous completion fails specifically in Bundled mode would be greatly appreciated. Best Regards, Charles
Topic: App & System Services SubTopic: Drivers Tags:
Jan ’26
Widget - App may push the list view twice when launched from widget
Issue Description: Tapping the app widget sometimes triggers the Universal Link twice, causing duplicate navigation or actions within the app Steps to Reproduce: Add the app widget to the home screen Tap the widget to open the app via the Universal Link Observe that the Universal Link is sometimes fired twice Expected Behavior: Tapping the widget should trigger the Universal Link only once. Actual Behavior: Universal Link is triggered twice, causing duplicate navigation or actions.
2
0
116
Jan ’26
Purchase Intent does not work when app has been launched
I'm implementing PurchaseIntent.intents for App Store in-app purchase promotions, following Apple's WWDC guidance. The API only works on cold launch (killed→launch), but fails on background→foreground transitions, making App Store promotions unusable. Sample code as followed from WWDC23 video What's new in StoreKit 2 and StoreKit Testing in Xcode. In the StoreKitManager observable class, I have this function which is initialized in a listening task: func listenForPurchaseIntent() -> Task { return Task { [weak self] in for await purchase in PurchaseIntent.intents { guard let self else { continue } let product = purchase.product await self.purchaseProduct(product) } } } where purchaseProduct() will perform the call to: try await product.purchase() ISSUE: When the app is in background (after previously launched), and the purchase intent is initiated from Xcode Transaction Manager or using the itms-services://?action=purchaseIntent method, the system foregrounds my app but the purchase intent is never
3
0
201
Jan ’26
Reply to AppKit - Legal to Change a View's Frame in -viewDidLayout?
Thanks a lot for responding. Thanks for the post, it’s hard not seeing the code and how you're setting constrains in code. Would you be so kind to provide your code where you setting the constraints so developers here can see it? [..] it is generally not a good idea (and will lead to crashes) to directly modify the frame or bounds of a view that is managed by Auto Layout in my opinion. Initially I did not involve Autolayout at all explicitly. What I had was a small container view controller with something like this (no explicit constraints): @implementation SmallInfoWrapperViewController -(void)viewDidLayout { [super viewDidLayout]; NSRect bounds = self.view.bounds; CGFloat lineHeight = 1.0; self.separator.frame = NSMakeRect(0.0,bounds.size.height-lineHeight,bounds.size.width,lineHeight); BOOL separatorVisible = !self.separator.isHidden; CGFloat wrappedViewHeight = bounds.size.height; if (separatorVisible) { wrappedViewHeight -= lineHeight; } self.wrappedView.frame = NSMakeRect(0.0,0.0,bounds.size.width, wrap
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’26