Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Testing Significant Location Change
You would want to use the Simulator's Features -> Location to test how your app handles location updates. But eventually, for testing background capabilities, the only reliable test would be to run the app on a physical device while it is standalone, not connected to Xcode - for which you would want to implement your own logging and testing methodology within the app - and for location apps, actually travel, as simulated locations are going to perform better than real ones, and if testing background capabilities attached to Xcode, you will not get a real life demonstration of how your app performs, as debugging via Xcode will give it additional capabilities to assist in debugging your code, but will not show what your customers will eventually experience.
2w
Reply to BLE Advertising in Background
When an app is not in the foreground, any advertising by it is done on a best effort basis, and it cannot be guaranteed, and there are some changes and limitations to the advertised data. As Bluetooth is a shared resource, when other apps and system resources need to use Bluetooth, advertising for apps in the background will slow down, and may even stop for short periods of time. To perform certain peripheral role tasks while in the background, you must include the UIBackgroundModes key with the bluetooth-peripheral value in your app’s Info.plist file. That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while in the background: The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised. All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a specia
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to Buttons become unresponsive after using .windowStyle(.plain) with auto-hiding menu
Can you try commenting out your entity/SpatialTapGesture code? I have a hunch that the entity may be intercepting taps intended for the button. visionOS has some odd issues when we place gestures on entities that the user will be inside of. You may want to take a look at SpatialEventGesture instead of using the tap in an entity. This will let you listen to input anywhere in the immersive space without using a specific entity. Docs: https://developer.apple.com/documentation/swiftui/spatialeventgesture Example Code: https://stepinto.vision/example-code/spatial-event-gesture/ Is .windowStyle(.plain) expected to affect button interaction behavior? No, I've used buttons in many plain windows. Unless visionOS 26.3 introduced a new bug, it seems like something else is going on here. What is the recommended approach to achieve a transparent/hidden window in immersive mode while maintaining button interactivity? You're on the right track, see above about the entity gesture intercepting input. Is there an alte
Topic: Spatial Computing SubTopic: General Tags:
2w
NETransparentProxyProvider frequent tunnel churn during Dark Wake cycles on macOS.
Description Our NETransparentProxyProvider system extension maintains a persistent TLS/DTLS control channel to a security gateway. To maintain this stateful connection the extension sends application-level Keep Alive packets every few seconds (example : 20 seconds). The Issue: When the macOS device enters a sleep state, the Network Extension process is suspended, causing our application-level heartbeat to cease. Consequently, our backend gateway—detecting no activity—terminates the session via Dead Peer Detection (DPD). The problem is exacerbated by macOS Dark Wake cycles. We observe the extension's wake() callback being triggered periodically (approx. every 15 minutes) while the device remains in a sleep state (lid closed). During these brief windows: The extension attempts to use the existing socket, finds it terminated by the backend, and initiates a full re-handshake. Shortly after the connection is re-established, the OS triggers the sleep() callback and suspends the process again. This creates a connect
3
0
142
2w
Reply to Where did I screw up trying concurrency?
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. It's now public Cool. That’s some pretty complicated code. What are you actually trying to achieve here? Looking at the interface for SynchronizedQueue, it seems like you’re creating an actor with enqueue and dequeue semantics. You then have a world of unsafe code to implement a linked list. Could you perhaps replace that with the Deque type from Swift Collections. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
2w
Reply to Apps do not trigger pop-up asking for permission to access local network on macOS Sequoia/Tahoe
[quote='874373022, TotalPhase, /thread/814226?answerId=874373022#874373022, /profile/TotalPhase'] Our engineers have thoroughly followed the practices outlined in TN3179. [/quote] Cool. I’m pretty sure there are mysterious extant problems with local network privacy, especially on the Mac. However, the ones I’m aware of are much harder to reproduce [1]. In your case it sounds like you can reproduce this 100% of the time. For example: You set up a VM that’s never seen your app before. You install the app on that VM. You start it up. It’s blocked from performing local network operations. And it never displays the local network alert. Is that right? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] For example, the one in this thread
2w
Reply to Any (developer) option to override log quarantine?
[quote='874485022, qb_s, /thread/814022?answerId=874485022#874485022, /profile/qb_s'] disable logging for all other processes/subsystems … that tend to be noisy too? [/quote] Yeah, I could see how that might actually help in your situation. [quote='874485022, qb_s, /thread/814022?answerId=874485022#874485022, /profile/qb_s'] I filed an improvement request anyway (FB21839588). [/quote] Fair enough. I’ll be interested to see how that pans out (-: [quote='874485022, qb_s, /thread/814022?answerId=874485022#874485022, /profile/qb_s'] And what of log stream …? [/quote] Honestly, I’m not sure what’ll happen in that case. Live streaming of the full system log has a significant impact on system performance, to the point that we even added a little warning about it in Console (“Stream log messages will impact system performance.”). My concern here is that, regardless of whether log entries get dropped or not [1], that performance impact could perturb the system to the point where the bug you’
Topic: App & System Services SubTopic: Core OS Tags:
2w
AccessorySetupKit / Wi-Fi Aware example?
Greetings, According to Apple's Wi-Fi Aware documentation (https://developer.apple.com/documentation/wifiaware) the Wi-Fi Aware APIs can be used only with peer devices that have been paired. Pairing can be performed using AccessorySetupKit or DeviceDiscoveryUI. Unfortunately, the sample code for Wi-Fi Aware doesn't include either of these APIs. (https://developer.apple.com/documentation/wifiaware/building-peer-to-peer-apps) Looking at the sample code for AccessorySetupKit (https://developer.apple.com/documentation/accessorysetupkit/setting-up-and-authorizing-a-bluetooth-accessory) there is only an example using Bluetooth. And the AccessorySetupKit APIs don't yet document how Wi-Fi Aware is used or how one sets up the Info.plist with the appropriate keys. Can Apple update its example code to fill in these gaps or point me to documentation that can fill in these gaps? It is hard to develop an understanding of the capabilities of these APIs when they are so poorly documented. Thanks for any help, Smith
1
0
119
2w
TransparentProxy extension is not enabled when user performs logout and login with the extension deployed using MDM
We have an application which is written in Swift, which activates Transparent Proxy network extension. Our Transparent Proxy module is a system extension, which is exposing an app proxy provider interface (We are using NETransparentProxyProvider class and in extension’s Info.plist we use com.apple.networkextension.app-proxy key.) We are using JamF MDM profile with VPN payload for deployment. With this MDM profile, we are observing an issue, ie TransparentProxy extension is not enabled when user performs logout and login and only in Sonoma. By analyzing it further we are noticing that in Sonoma some times, the system invokes NETransparentProxyProvider's stopProxy delegate once or twice with NEProviderStopReason as 12 ie userLogout. Due to this after login the system extension is not activated.
2
0
83
2w
SwiftUI ScrollView scrollTo not consistently scrolling to latest message
I am implementing an AI chat application and aiming to achieve ChatGPT-like behavior. Specifically, when a new message is sent, the ScrollView should automatically scroll to the top to display the latest message. I am currently using the scrollTo method for this purpose, but the behavior is inconsistent—sometimes it works as expected, and other times it does not. I’ve noticed that this issue has been reported in multiple places, which suggests it may be a known SwiftUI limitation. I’d like to know: Has this issue been fixed in recent SwiftUI versions, or does it still persist? If it still exists, is there a reliable solution or workaround that anyone can recommend?
3
0
191
2w
Reply to SwiftUI ScrollView scrollTo not consistently scrolling to latest message
The above approach did improve the scrolling behavior to some extent, but it wasn’t fully reliable in the long run. After that, I tried a different solution by bridging SwiftUI with UIKit and switching to a UICollectionView. With this approach, the scrolling issues were completely resolved, and I no longer see any unexpected behavior, even with large, continuously streaming responses.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Reply to Review taking much longer than usual
Thank you for your response and for the suggestion. I have signed in with my Developer ID and checked the provided contact link. However, on my side, I’m currently only able to see the email/contact form option and I do not see the “Request a one-on-one App Review consultation” option listed under the Meet with Apple or App Review sections. I have already submitted an email request regarding the app review status through the available contact option, but so far I haven’t received any update. Could you please let me know if there is any specific eligibility, region-based limitation, or alternative way to request a one-on-one App Review consultation? Any guidance would be greatly appreciated. Thank you for your support.
2w
Reply to App "In review" for long time
Thank you for your response and for the suggestion. I have signed in with my Developer ID and checked the provided contact link. However, on my side, I’m currently only able to see the email/contact form option and I do not see the “Request a one-on-one App Review consultation” option listed under the Meet with Apple or App Review sections. I have already submitted an email request regarding the app review status through the available contact option, but so far I haven’t received any update. Could you please let me know if there is any specific eligibility, region-based limitation, or alternative way to request a one-on-one App Review consultation? Any guidance would be greatly appreciated. Thank you for your support.
2w
Reply to Any (developer) option to override log quarantine?
While this isn't the answer I had been wishing for it does give me a lot of food for thought. Thanks The Eskimo for looking into it! [quote='874248022, DTS Engineer, /thread/814022?answerId=874248022#874248022'] When it rotates a file, the system calculates how fast it filled up. [/quote] So wrt this note, I understand it's more complicated than just rotating a single file, but still it sounds like everyone writing into the Unified Logging system can contribute to this. It strikes me at least one strategy (if not a preferable one), is to disable logging for all other processes/subsystems (even some of the native OS processes) that tend to be noisy too? Of course this is meant as a temporary and desperate measure, in theory it should raise our survival chance? And another thought, what if we disable persisting, but then have an external party help redirect our logs to be persisted? I first thought the xctrace record --template Logging might be a good candidate for this task but later found out the deferred, or
Topic: App & System Services SubTopic: Core OS Tags:
2w
How to properly localize AppIntent dialogs for Siri?
Hi! I have defined the following app intent. It returns a result with a dialog to confirm that the intent has been executed. Naturally, that dialog needs to be localized properly. But the String interpolation with the provided format doesn't do that. I specified wide for the width parameter and expect spelled-out unit names. However, in the textual output, Siri always uses the abbreviated unit (e.g. min or s), in all languages I tested. In the audio output, Siri says minutes in English where the textual representation is min. In German, Siri says min, so it basically reads the textual representation aloud and that's not quite understandable to the user. struct StartTimerIntent: AppIntent { static let title: LocalizedStringResource = Start New Timer static var description = IntentDescription(Starts a timer with a custom duration.) @Parameter(title: Duration, description: The duration of the timer.) var duration: Measurement func perform() async throws -> some IntentResult & ProvidesDialog { //
3
0
382
2w