Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Orphaned 9GB Simulator Runtime in /System/Library/AssetsV2 - Cannot Delete (SIP protected)
I am encoutering the same problem with a universal iOS simulator version (18.5) Because the old version (18.5) is missing from this XML, Xcode and mobileassetd seem to have lost track of it entirely. I managed to get Xcode to recognise it, but Xcode chooses to soft delete instead of ing the disk. Running scan-and-mount identifies the orphan simulator: > xcrun simctl runtime scan-and-mount > xcrun simctl runtime list == Disk Images == -- iOS -- iOS 26.2 (23C54) - E2B78652-EDF6-450D-BC2C-2F0B11B3AD95 (Ready) -- unknown -- - CE40DFD4-ACAC-4A6B-975A-51148DA604B0 (Verifying) Total Disk Images: 2 (7.8G) [Note: 1 image(s) are of unknown size] > xcrun simctl runtime list == Disk Images == -- iOS -- iOS 18.5 (22F77) - CE40DFD4-ACAC-4A6B-975A-51148DA604B0 (Ready) iOS 26.2 (23C54) - E2B78652-EDF6-450D-BC2C-2F0B11B3AD95 (Ready) Total Disk Images: 2 (7.8G) [Note: 1 image(s) are of unknown size] Then I tried to directly delete the simulator: > xcrun simctl runtime delete 22F77 > xcrun simc
3w
Sharing My Experience in Developing an SSL Certificate Monitoring Website
Hi everyone, recently I used codex and GPT-5.2 to build a simple SSL certificate monitoring website, and I'd like to share some of my development experiences. The project link is at the end, but first, let's talk about the technical implementation. The Motivation I've encountered several service outages caused by expired SSL certificates in the past. Each time, I had to react after users reported the issue, which was very passive. While there are some monitoring tools on the market, they are either too heavy or lack the necessary features, so I decided to build my own. Technology Stack Next.js 16 + shadcn/ui + TypeScript I chose Next.js because: The development experience with App Router is excellent, with a clear mapping between routes and file structure. Server Components reduce the need for client-side JavaScript. Built-in features like image optimization and font loading are ready to use out of the box. shadcn/ui is a component library based on Radix UI, and its advantages are: Components are copied direc
0
0
186
3w
Array of Bool require NSNumber.self in NSKeyedArchiver decoding list of types
I decode an object with NSKeyedArchiver (SecureCoding): typealias BoolArray = Array> let val = decoder.decodeObject(of: NSArray.self, forKey: someKey) as? BoolArray I get the following log: *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( 'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework] )}'. This will be disallowed in the future. I changed by adding NSNumber.self in the list : let val = decoder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: someKey) as? BoolArray No more warning in log. Is there a reason for this ?
3
0
134
4w
Reply to NSURL - Are Cached Resource Values Really Automatically Removed After Each Pass Through the Run Loop?
Thanks for the post, I think your understanding is great and this is very interesting how you use the API and how it behaves. Your observations touch on some subtle behaviors and design philosophies around file resource handling with (and related APIs) in the frameworks that I have been reading the documentation looking for those. However, most of the time I find it better to create a test project to see how it works. I am not an expert on that field, so we should involved someone from that team as it seems these caches are generally managed by the system to balance performance and resource usage, and not strictly tied to any particular run loop like the main or a background thread's run loop? I need to write some code as maybe creating instances or fetching their resource values on background threads is indeed recommended for performance reasons, especially for potentially blocking I/O operations. As you suggested, using with more control over caching might suit your needs if you require fi
Topic: App & System Services SubTopic: General Tags:
4w
Reply to macOS 15 (Sequoia): Endpoint Security client runs by hand, but LaunchDaemon fails with TCC “Full Disk Access” denial on unmanaged Macs
Then when the user manually adds the app, it loads in as the app, not the service, so FDA is only given to the app. Is this a permissions problem that keeps it from being populated to FDA screen or is there something else keeping the system from tying the app to the service? Taking a look at your app, I realized that it's not really properly constructed. The expected pattern here is that there are two different executable components: (1) The containing app bundle. Generally speaking, this is a standard interactive application. Its role (along with whatever else it does) is to manage the SMAppService. (2) The target executable the Launchd.plist. This is specified in the plist as described here: -In the agents and daemons property lists, replace the Program key with the BundleProgram key and make the path relative to the bundle, such as Contents/Resources/mydaemon. Note that the Resources directory is an invalid recommendation (r.168792717). Per Placing content in a bundle and TN2206, Nested Code, I wo
Topic: App & System Services SubTopic: Core OS Tags:
4w
Reply to How to solve this NSKeyedArchiver warning
Thanks Albert for replying. Is it an array where you use NSKeyedUnarchiver validateAllowedClass:forKey:? I have a lot of classes with SecureCoding, and I cannot find from the warning in the log where it comes from. What is surprising is that I have commented out all the NSNumber.self in any list of decoder.decodeObject(of:, key:) like if let format = decoder.decodeObject(of: [NSArray.self/*, NSNumber.self*/], forKey: formatKey) as? [[Int]] { And still get the log. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( 'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework] )}'. This will be disallowed in the future. *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundatio
Topic: App & System Services SubTopic: General Tags:
4w
Wrong position of searchable component on first render
Hey all, I found a weird behaviour with the searchable component. I created a custom bottom nav bar (because I have custom design in my app) to switch between screens. On one screen I display a List component with the searchable component. Whenever I enter the search screen the first time, the searchable component is displayed at the bottom. This is wrong. It should be displayed at the top under the navigationTitle. When I enter the screen a second time, everything is correct. This behaviour can be reproduced on all iOS 26 versions on the simulator and on a physical device with debug and release build. On iOS 18 everything works fine. Steps to reproduce: Cold start of the app Click on Search TabBarIcon (searchable wrong location) Click on Home TabBarIcon Click on Search TabBarIcon (searchable correct location) Simple code example: import SwiftUI struct ContentView: View { @State var selectedTab: Page = Page.main var body: some View { NavigationStack { ZStack { VStack { switch selectedTab { c
2
0
123
4w
Reply to NSURL - Are Cached Resource Values Really Automatically Removed After Each Pass Through the Run Loop?
Thanks for responding. I haven't yet been able to reproduce the issue in a small test project so either they made changes in a macOS update or there is some timing issue and/or way the NSURL is initialized in my real project teases the issue out. But I promise I got stale value for nonexistent NSURLIsHiddenKey until I started explicitly dumping it. In my real project the URL comes for -fileURLWithPath: (and initially created on a background thread). My real project is large and complex so when I have more time I'll have to see if I can isolate the issue in a small sample. Due the request by iOS and the server cache the user may see some discrepancies or additional nuances in how and caching behave, particularly regarding stale values. I'm on macOS. Explicit cache management is recommended, especially when dealing with URLs that may have changed state (e.g., deleted or modified), to ensure your application behaves predictably across different environments and runtime sessions. Also CFURL is documented to have
Topic: App & System Services SubTopic: General Tags:
4w
Reply to How to solve this NSKeyedArchiver warning
Hey Claude, always the most interesting questions. But in all honesty, I don’t know how are you getting to that. I need more context and the full scroll of warnings as right now it looks like warnings relate to security improvements in regarding unarchiving objects. Is that a TestFlight build? Can you provide here more information about the build and code causing this? Is it an array where you use NSKeyedUnarchiver validateAllowedClass:forKey:? Would be great to see the sydiagnose for these warnings aim to inform you about potential security risks when unarchiving data from untrusted sources? If your array contains objects and you've only added to the allowed classes list To resolve this warning, you should include all specific types contained within the archived data that are expected to be decoded. If your array indeed contains objects, update your allowed classes. Any chance you can produce a focused sample so we can take a look of the those warnings? Looking forward to see the focused simple proj
Topic: App & System Services SubTopic: General Tags:
4w
Reply to AVCaptureDevice.RotationCoordinator.videoRotationAngleForHorizonLevelCapture: behavior is different with iPhone 17
Hi there shimanopower, The difference in rotation angle is expected on iPhone 17 due to a different sensor rotation. Looks like your 2nd line in the first code block is not taking into consideration any video rotation already being applied in the AVCaptureConnection to your output. Here's some sample code: let videoRotationAngle = self.videoRotationAngle let videoConnectionVideoRotationAngle = self.videoOutputConnection!.videoRotationAngle // Subtract how much we should apply (videoRotationAngle) by how much is already applied (videoConnectionVideoRotationAngle) let rotationAngleToApply = videoRotationAngle - videoConnectionVideoRotationAngle var videoRotationTransform = CGAffineTransform(rotationAngle: rotationAngleToApply * .pi / 180.0) // Convert from degrees to radians To achieve best performance, set your video rotation angle on your video data output's connection to 0 — which will result in unrotated video from the source. But be aware that the source might come from a different sensor rotation
Topic: Media Technologies SubTopic: Video Tags:
4w
How to solve this NSKeyedArchiver warning
I get several warnings in log: *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{( 'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework] )}'. This will be disallowed in the future. I am not sure how to understand it: I have removed every NSNumber.self in the allowed lists for decode. To no avail, still get the avalanche of warnings. What is the key NS.objects about ? What may allowed classes set: '{( 'NSArray' be referring to ? An inclusion of NSArray.self in a list for decode ? The type of a property in a class ?
4
0
296
4w
Reply to How to call decoder with the right types ?
NSSecureCoding requires explicit type declaration for all classes in the object graph. When decoding an array, you must specify both the container type (NSArray) AND the element type (Item). The current code only specifies NSArray.self or Item.self (but not both), so the decoder doesn't know it's allowed to decode the Item objects from the array. You tried [NSArray.self, NSString.self, NSColor.self, NSNumber.self], but didn't include Item.self in the list. Other than that, verify both classes have complete encode/decode pairs using the same keys in both the encoding and decoding methods. Make sure all the key strings match exactly, etc.
Topic: App & System Services SubTopic: General Tags:
4w
Reply to SwiftUI view state resetting after alert is shown
Thanks for the follow ups. Can’t believe I’m not reproducing so let me take a step back and let’s get this to reproduce. Based on your description, it seems that the inside the is being recreated when the flag changes, causing issues in your SwiftUI view. This behavior might occur because SwiftUI re-evaluates views when state changes, and if the identity of views isn’t stable, it can lead to unnecessary recreations. What Xcode build do you use and what iOS simulator do you use? Can we get this in a focused sample so I can download and run it in different Xcode versions? And also will be good if other SwiftUI engineers take a look because I’m failing to reproduce it, so something I am not doing correctly. If the static text doesn’t recreate, the issue might be related to how handles state updates. Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI
4w
Reply to The requested app is not available or doesn't exist.
@savci2 Thanks for your post, this is the second old thread I see you posting the issue you are having with TestFlight. I would recommend you if you are having a problem with TestFlight to create a new thread and post all the logs and screenshots so engineers here can look if this is a new issue or an existing issue and help you. Make sure you’ve added the external testers’ emails to the Internal Testing and External Testing lists in the App Store Connect dashboard. External testers must accept the invitation to download the app. Ensure that all agreements related to distributing your app on TestFlight are active. Check the logs in Xcode’s Devices and Simulators section. There might be error messages related to the download issue and provide those logs on your post. Hope this helps. Albert Pascual
  Worldwide Developer Relations.
4w