Provide views, controls, and layout structures for declaring your app's user interface using SwiftUI.

Posts under SwiftUI tag

200 Posts

Post

Replies

Boosts

Views

Activity

Async/Await and updating state
When using conformance to ObservableObject and then doing async work in a Task, you will get a warning courtesy of Combine if you then update an @Published or @State var from anywhere but the main thread. However, if you are using @Observable there is no such warning. Also, Thread.current is unavailable in asynchronous contexts, so says the warning. And I have read that in a sense you simply aren't concerned with what thread an async task is on. So for me, that begs a question. Is the lack of a warning, which when using Combine is rather important as ignoring it could lead to crashes, a pretty major bug that Apple seemingly should have addressed long ago? Or is it just not an issue to update state from another thread, because Xcode is doing that work for us behind the scenes too, just as it manages what thread the async task is running on when we don't specify? I see a lot of posts about this from around the initial release of Async/Await talking about using await MainActor.run {} at the point the state variable is updated, usually also complaining about the lack of a warning. But ow years later there is still no warning and I have to wonder if this is actually a non issue. On some ways similar to the fact that many of the early posts I have seen related to @Observable have examples of an @Observable ViewModel instantiated in the view as an @State variable, but in fact this is not needed as that is addressed behind the scenes for all properties of an @Observable type. At least, that is my understanding now, but I am learning Swift coming from a PowerShell background so I question my understanding a lot.
5
0
1.5k
Dec ’24
Wrapping views with a VStack breaks animation, but using an extension to do the same thing fixes it.
I was having issues with views transitioning between being visible and not visible inside of List. They would appear, but the animation would be jerky. I switched to using a Section, and the animation looked much better. However, the spacing between views and padding wasn't what I wanted. So I wrapped some of the views inside the Section with a VStack. But first, this is how my view SectionView looks: struct SectionView<Content: View>: View { let title: String @ViewBuilder var content: () -> Content var body: some View { Section { Text(title) .font(.title3.bold()) content() } .listRowInsets(EdgeInsets(top: 10, leading: 20, bottom: 10, trailing: 20)) .listRowBackground(Color.clear) .listRowSeparator(.hidden) .contentShape(.rect) } } Below was in a separate view: SectionView(title: "Title") { Group { HStack { // Stuff here } if let selectedMonth { VStack(alignment: .leading, spacing: 10) { // Stuff here } } } .animation(.smooth, value: selectedMonth) } This, however, broke the animations again when the VStack appears. It went back to being jerky. So instead of wrapping the content inside of a VStack, I created an extension to do the same thing. extension View { @ViewBuilder func condensed() -> some View { VStack(alignment: .leading, spacing: 10, content: { self }) } } So now instead of wrapping it in a VStack, I do this: if let selectedMonth { Group { // Stuff here } .condensed() } The animations look good again. I just can't figure out why that is. Can anyone help me understand this?
0
0
255
Dec ’24
SwiftUI: Picker text color not changing until reloading view
My picker looks like this: Picker("Color", selection: $backgroundColor.animation(), content: { ForEach(TransactionCategory.Colors.allCases, id: \.self) { color in Text(color.rawValue) .tag(color) .foregroundStyle(color.getColor()) } }) This changes a tint color which is applied to the entire tabview. I can see that it's working because the buttons in the top tab bar are changing color as I change the picker value. However, the color of the text inside the picker is not changing until I go back one view and then come back to this view. I tried setting an ID on the picker and then updating it when the picker value changes, but that didn't work. Any ideas?
0
2
504
Dec ’24
Abnormal behavior .confirmationDialog/.alert inside lazyVstack
This is a reproducible issue, create a blank project and put a cell inside a scrollview lazyVstack, I need to have the confirmation dialog on the button or else on iPad it will crash but having the .confirmationDialog inside the lazyVstack leads to unexpected behavior. If you try to click through the cells from 1-10 the .confirmationDialog will stop working after a few taps on the cells. Not sure what the workaround is I'm trying to do something similar in my app with post cells and it's just not working well. I've also noticed that a similar thing happens with .alert if you have it inside the LazyVStack. struct ContentView: View { var body: some View { ScrollView { LazyVStack { ForEach(0..<10) { number in cell(number: number) } } } } } struct cell: View { @State private var isShowingDialog: Bool = false let number : Int var body : some View { Button { print("Tapped Cell") isShowingDialog.toggle() } label: { Text("\(number)") .frame(height: 200) .frame(maxWidth: .infinity) .border(.black) } .padding(.horizontal, 16) .confirmationDialog("Options", isPresented: $isShowingDialog, titleVisibility: .visible) { Button("Some Button", role: .destructive) { print("Did Tap Option Button") } Button("Some Other Button") { print("Did Tap Other Option Button") } } } }
0
2
261
Dec ’24
Help with SwiftUI and UIKit Interjection
Hi, need some help with an iOS application we are trying to make future safe. Basically, we know that our app would require SwiftUI so the app is made in that framework, however we require some important elements that are available only in UIKit, so we've made a bridge that allows us to pass UIKit views to SwiftUI to display them. So most of the app actually has UI made in UIKit, however, we now need to use the Charts framework present in SwiftUI, we've used SwiftUI buttons in our UIKit before by passing them through a HostingController (Passing SwiftUI buttons to UIKit to use). And we are currently considering to the same for SwiftUI Charts. Just to recap, it's a SwiftUI iOS app, that is mostly made in UIKit (through a bridge) but also has other SwiftUI elements injected into it. What we want to know that, is this the best way to do this? Or is there a better way to have UIKit and SwiftUI work more comfortably with eachother. The reason for such looping around is also because we interoping our C++ code to Swift for making this application, since we are making it for many other platforms and the business logic is in C++. Let me know if there are better ways to go about this!
1
0
348
Dec ’24
SwiftUI Color Issue
I have ran into an issue that is illustrated by the code in the following GitHub repository. https://github.com/dougholland/ColorTest When a SwiftUI color originates from the ColorPicker it can be persisted correctly and renders the same as the original color. When the color originates from the MapFeature.backgroundColor, it is always rendered with the light appearance version of the color and not the dark appearance version. The readme in the GitHub repo has screenshots that show this. Any assistance would be greatly appreciated as this is affecting an app that is in development and I'd like to resolve this before the app is released. If this is caused by a framework bug, any possible workaround would be greatly appreciated also. I suspect it maybe a framework issue, possibly with some code related to the MapFeature.backgroundColor, because the issue does not occur when the color originates from the ColorPicker.
2
1
528
Dec ’24
SwiftUI: onPreferenceChange not called if view contains if statement
Hi, I'm trying to build iOS app, but I found out that .onPreferenceChange has strange behaviour if the view contains an if statement below view which sets .preference. Here is an repository with minimal reproduction: https://github.com/Mordred/swiftui-preference-key-bug There should be displayed title text on the top and bottom of the screen. But the bottom is empty. If you delete if statement if true { at https://github.com/Mordred/swiftui-preference-key-bug/blob/main/PreferenceKeyBug/PreferenceKeyBug.swift then it works fine.
1
4
1.1k
Dec ’24
Correct way to remove arrays containing model objects in SwiftData
Are there any differences (either performance or memory considerations) between removing an array of model objects directly using .removeAll() vs using modelContext? Or, are they identical? Attached below is an example to better illustrate the question (i.e., First Way vs Second Way) // Model Definition @Model class GroupOfPeople { let groupName: String @Relationship(deleteRule: .cascade, inverse: \Person.group) var people: [Person] = [] init() { ... } } @Model class Person { let name: String var group: GroupOfPeople? init() { ... } } // First way struct DemoView: View { @Query private groups: [GroupOfPeople] var body: some View { List(groups) { group in DetailView(group: group) } } } struct DetailView: View { let group: GroupOfPeople var body: some View { Button("Delete All Participants") { group.people.removeAll() } } // Second way struct DemoView: View { @Query private groups: [GroupOfPeople] var body: some View { List(groups) { group in DetailView(group: group) } } } struct DetailView: View { @Environment(\.modelContext) private var context let group: GroupOfPeople var body: some View { Button("Delete All Participants") { context.delete(model: Person.self, where: #Predicate { $0.group.name == group.name }) } // assuming group names are unique. more of making a point using modelContext instead }
0
0
305
Dec ’24
How to create and manage nested List with NSTextList, NSAttributedString and UI/NSTextView
I am developing a library for RichTextEditor for SwiftUI, and I am facing issues with implementing NSParagraphStyle related features like nested bullet lists and text alignment. I have searched a lot and personally feel that the documentation is not enough on this topic, so here I want to discuss how we can achieve the nested list with UI/NSTextView and natively available NSTextList in NSParagraphStyle.textLists. The problem is I am not able to understand how I can use this text list and how to manage adding list and removing list with my editor I have seen code that work adding attributes to each string and then merge them, but I don't want that, I want to add/update/remove attributes from selected text and if text is not selected then want to manage typing attributes to keep applied attributes to current position
1
0
509
Dec ’24
SwiftUI and dragging a file onto the app icon
I'm playing around with using an app to automate some of my personal work flows, and one of the things I wanted to do was to be able to drag a .webloc file onto my app icon in the dock, to launch it. I've got public.data set up as a document type for it in Xcode, which translated to &lt;key&gt;CFBundleDocumentTypes&lt;/key&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;CFBundleTypeRole&lt;/key&gt; &lt;string&gt;Viewer&lt;/string&gt; &lt;key&gt;LSHandlerRank&lt;/key&gt; &lt;string&gt;Default&lt;/string&gt; &lt;key&gt;LSItemContentTypes&lt;/key&gt; &lt;array&gt; &lt;string&gt;public.data&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/array&gt; in the Info.plist for it, which seems correct. When I drag a .webloc file onto the Dock icon, it appears to be willing to accept it, but nothing seems to happen. In the app, I've got an AppDelegate.swift file which has extension Notification.Name { static let receivedURLsNotification = Notification.Name("ReceivedURLsNotification") } class AppDelegate: NSObject, NSApplicationDelegate { func application(_ application: NSApplication, open urls: [URL]) { guard !urls.isEmpty else { return } NotificationCenter.default.post(name: .receivedURLsNotification, object: nil, userInfo: ["URLs": urls]) } } (I copied it almost verbatim from a Medium post.) In the app swift file, I have @main struct LoggerApp: App, DropDelegate { @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate I set a breakpoint on application(_:NSApplication, open:[URL]), and did my drag, and the breakpoint never triggered. I added the application(didFinishLaunching(_:Notification) method, and that does get invoked when the app launches, so the app delegate does seem to be working. That seems to indicate the problem is somewhere else?
3
0
515
Dec ’24
Best Way to Support Different Devices in SwiftUI?
Hi, I have pretty much finished my app's layout but realized I needed to scale it for different devices. I have read online that hardcoding values (esp in frames) is a big no-no, and GeometryReader should be heavily utilized. Also was recommended ViewThatFits. The problem is, I want the app to look the exact same across all devices. What is the best way to get started? Also, when testing, do I only have to test on an iPad and iPhone or are the dimensions significantly different amongst each class of devices?
1
0
632
Dec ’24
EKEventStore on Apple Watch not showing all calendars
I have released a watchOS-specific application that retrieves data from the iPhone calendar app and displays it on the Apple Watch. It uses the calendars function in EKEventStore to retrieve the list of calendars, but it seems that it sometimes fails to retrieve iCloud calendars. Trouble is, this problem only occurs in a very few users‘ environments, the majority of other users’ environments are able to retrieve them without any problems, and I cannot reproduce it at all in my environment. Local calendars and Google calendars seem to be retrieved without any problems. Minimal example code: import SwiftUI import EventKit struct ContentView: View { let eventStore = EKEventStore() @State var success: Bool = false @State var calendarNames: [String] = [String]() func request() async { success = (try? await eventStore.requestFullAccessToEvents()) ?? false } func list() { calendarNames = eventStore.calendars(for: .event).map { $0.title } } var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Access: \(success.description)") ScrollView { ForEach(calendarNames, id: \.self) { name in Text(name) } } } .onAppear { Task { await request() list() } } .padding() } } I asked the user experiencing the problem to try restarting the iPhone and Apple Watch, reinstalling the app and re-pairing them, but there was no change. I would appreciate any information you can provide. Best regards.
1
0
448
Dec ’24
@Observation: Best way of handling binding after injecting a View-Model
In WWDC 2023 there was a good summary of how to handle the iOS 17 Observation capability. But despite the clear graphics, it was still ambiguous (for me.) I want to inject a class (view-model) so that it can be used in the complete view heirarchy, and used in bindings to allow bi-directional communication. As far as I can tell there are 2 ways of declaring the VM (alternatives 1 and 2 in my code), and 2 ways of consuming the VM in a view (alternatives 3 and 4 in my code). Using the flow-diagram I can't determine which is best. Here's the crux of my #Observable problem. import SwiftUI // MARK: - Model struct MyMod { var title = "Hello, World!" } // MARK: - MVV @Observable class MyMVV { var model: MyMod init() { self.model = MyMod() } } // MARK: - App @main struct MyApp: App { @Bindable var myGlobalMVV = MyMVV() // Alternative 1 // @State var myGlobalMVV = MyMVV() // Alternative 2 var body: some Scene { WindowGroup { ContentView() .environment(myGlobalMVV) // inject } } } struct ContentView: View { var body: some View { ContentDeepHierarchyView() } } struct ContentDeepHierarchyView: View { @Environment(MyMVV.self) var myGlobalMVV // digest var body: some View { @Bindable var myLocalMVV = myGlobalMVV // Alternative 3 TextField("The new title", text: $myLocalMVV.model.title) // Alternative 3 TextField("The new title", text: Bindable(myGlobalMVV).model.title) // Alternative 4 } Opinions?
1
0
652
Dec ’24
SwiftUI Core Data Relationship Not Updating View
I've run into a problem with the following setup: I have a Core Data database with parent objects with a relationship to many child objects. I have a main view using SwiftUI FetchedResults that displays the parent objects in a list and properties about the child objects. I have a second view that lets you change properties of the child objects. The parent object has the property: name (string). The child object has: name (string) and star (bool). On the main view I display a list of parent objects and how many child objects are starred. On the second view I update if a child object is starred. Upon updating the property on the second view and saving, the first view does not update until you relaunch the app. Here is the main view: struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @FetchRequest(sortDescriptors: [SortDescriptor(\.name)]) private var parents: FetchedResults<Parent> @State private var editingParent: Parent? var body: some View { List { ForEach(parents) { parent in VStack(alignment: .leading) { Text(parent.name ?? "No Name") Text("\(parent.children!.count) children") Text("\(getNumberOfStar(parent: parent)) Stared") } .onTapGesture { editingParent = parent } } } .sheet(item: $editingParent) { parent in ChildrenView(parent: parent) } Button { PersistenceController.shared.saveParent(name: "New Parent") } label: { Text("Add Parent") }.padding() Button { parents.forEach { parent in PersistenceController.shared.delete(parent: parent) } } label: { Text("Delete All") }.padding() } //this function does not get called when the database changes func getNumberOfStar(parent: Parent) -> Int { let children = parent.children!.allObjects as! [Child] let starred = children.filter({$0.star == true}) return starred.count } } This is the child view: @FetchRequest var children: FetchedResults<Child> var parent: Parent init(parent: Parent) { self.parent = parent _children = FetchRequest<Child>(sortDescriptors: [], predicate: NSPredicate(format: "parent = %@", parent)) } var body: some View { List { ForEach(children) { child in HStack { Text(child.name ?? "No Name") Text(child.star ? "⭐️" : "") Spacer() Button { PersistenceController.shared.updateStar(child: child) } label: { Text("Toggle Star") } } } } Button { PersistenceController.shared.saveChild(name: "New Child", parent: parent) } label: { Text("Add Child") } } } This is the Persistence Controller: static let shared = PersistenceController() let container: NSPersistentContainer init(inMemory: Bool = false) { container = NSPersistentContainer(name: "Model") if inMemory { container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null") } container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. /* Typical reasons for an error here include: * The parent directory does not exist, cannot be created, or disallows writing. * The persistent store is not accessible, due to permissions or data protection when the device is locked. * The device is out of space. * The store could not be migrated to the current model version. Check the error message to determine what the actual problem was. */ fatalError("Unresolved error \(error), \(error.userInfo)") } }) container.viewContext.automaticallyMergesChangesFromParent = true } func save() { let viewContext = container.viewContext do { try viewContext.save() } catch { /** Real-world apps should consider better handling the error in a way that fits their UI. */ let nsError = error as NSError fatalError("Failed to save Core Data changes: \(nsError), \(nsError.userInfo)") } } func saveParent(name: String) { let newParent = Parent(context: container.viewContext) newParent.name = name save() } func saveChild(name: String, parent: Parent) { let newChild = Child(context: container.viewContext) newChild.name = name newChild.parent = parent newChild.star = false save() } func updateStar(child: Child) { child.star.toggle() save() } func delete(parent: Parent) { let viewContext = container.viewContext viewContext.delete(parent) save() } } Finally here is the App struct: struct Core_Data_Child_Save_ExampleApp: App { let persistenceController = PersistenceController.shared var body: some Scene { WindowGroup { ContentView() .environment(\.managedObjectContext, persistenceController.container.viewContext) } } }
4
0
1k
Dec ’24
FamilyActivitySelection sharing between device in Family Sharing Network
I'm working with the FamilyControls API and am running into an issue with sharing ActivityTokens between devices in the same family sharing network. Based on this documentation, ActivityTokens are only accessible and readable by other members in the family sharing network. My app is based on the idea that if one user selects the Games category in the FamilyActivityPicker, then this token can be shared with another device in the same family-sharing network and this other device can read and display the category. So my question is: If a user in the network selects an activity category in the FamilyActivityPicker, can this category token be shared, read, and used by another user in the family-sharing network?
1
0
392
Dec ’24
Changing focus state in onSubmit causes keyboard to bounce
Is there any way to prevent the keyboard from bouncing when changing the focus state in onSubmit? Or is it not recommended to change focus in onSubmit? The following view is setup so that pressing return on the keyboard should cause focus to move between the TextFields. struct TextFieldFocusState: View { enum Field { case field1 case field2 } @FocusState var focusedField: Field? var body: some View { Form { TextField("Field 1", text: .constant("")) .focused($focusedField, equals: .field1) .onSubmit { focusedField = .field2 } TextField("Field 2", text: .constant("")) .focused($focusedField, equals: .field2) .onSubmit { focusedField = .field1 } } } } I would expect that when pressing return, the keyboard would say on screen. What actually happens is the keyboard appears to bounce when the return key is pressed (first half of gif). I assume this is because onSubmit starts dismissing the keyboard then setting the focus state causes the keyboard to be presented again. The issue doesn't occur when tapping directly on the text fields to change focus (second half of gif).
1
2
478
Dec ’24
Button in navigation bar using UIHostingController appears after push animation
I'm trying to push a SwiftUI view from UIKit using UIHostingController. In the new view there is a button in the right side of the navigation bar, but it pops after the push animation. I can't make it appear with an animation like in a normal UIViewController. I tried adding the button in the navigationItem of the hosting controller and in the toolbar of the SwiftUI but none gives a smooth animation. I've made a small test and this are the results. This is the code: class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() title = "Home" } @IBAction func buttonNavPressed(_ sender: Any) { let vc = UIHostingController(rootView: ContentView()) vc.navigationItem.title = "NavItem Button" vc.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(sayHello)) navigationController?.pushViewController(vc, animated: true) } @IBAction func buttonSwiftUIPressed(_ sender: Any) { let vc = UIHostingController(rootView: ContentViewWithButton()) navigationController?.pushViewController(vc, animated: true) } @objc func sayHello() { print("Hello") } } struct ContentView: View { var body: some View { Text("No button") } } struct ContentViewWithButton: View { var body: some View { Text("With button") .navigationTitle("SwuitUI W Button") .toolbar { ToolbarItem(placement: .topBarTrailing) { Button(action: { print("Hello") }, label: { Image(systemName: "camera") } ) } } } } There is any workaround to this problem?
0
0
317
Dec ’24
WatchOS app crashes when using .topBarTrailing toolbar item placement
I'm running into an issue with using .topBarTrailing placement for a toolbar item. The app fails to launch (crashes) with this placement. The following view works fine with any other placement (other than .topBarLeading). What am I doing wrong? var body: some View { NavigationStack { Text("Overview") .toolbar { ToolbarItem(placement: .topBarTrailing) { Button { // noop } label: { Label("Add", systemImage: "plus") } } } .navigationTitle("Overview") .navigationBarTitleDisplayMode(.inline) } } I've opted to use .confirmationAction as a workaround, which works fine. It also positions the toolbar item in the same place on the view as the .topBarTrailing placement would. I'm using Xcode version 15.0 and targeting WatchOS 10. Verbose error output when trying to run the app in the simulator: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Layout requested for visible navigation bar, <PUICStackedNavigationBar: 0x100e1e8d0; baseClass = UINavigationBar; frame = (0 0; 198 60); opaque = NO; autoresize = W; layer = <CALayer: 0x60000027c280>> delegate=0x101877800 standardAppearance=0x60000261cc60, when the top item belongs to a different navigation bar. topItem = <UINavigationItem: 0x100f11230> title='Overview' style=navigator, navigation bar = <PUICStackedNavigationBar: 0x100f22a80; baseClass = UINavigationBar; frame = (0 0; 198 60); opaque = NO; autoresize = W; layer = <CALayer: 0x6000002887c0>> delegate=0x101069600 standardAppearance=0x60000261f3c0, possibly from a client attempt to nest wrapped navigation controllers.'
3
1
1.2k
Dec ’24
Need help with objc_fatalv crash
My app's top crash is a mysterious one and I can't seem to figure it out. It always crashes on _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) But the stack traces include a few different possible culprits like NavigationBridge_PhoneTV.pushTarget(isDetail:) UIKitNavigationBridge.update(environment:) ViewRendererHost.updateGraph() UIScrollView(SwiftUI) _swiftui_adjustsContentInsetWhenScrollDisabled Crash reports here: 2024-12-02_21-37-21.7864_-0600-1e78918e5586309b96a1c2986ff722778dec8a77.crash 2024-12-02_19-18-29.1251_-0500-a2fc5513683cd647b4adbbe03cc59e4a09237b5f.crash 2024-12-01_11-59-09.8888_-0500-9eb224ab3d37e76d0b966ea83473f584ac3bbe18.crash 2024-11-28_17-17-38.4808_+0100-46208989f016fbefd16c30873a88c2ef61dd91a1.crash Hopefully someone here can shed some light. For context we use a lot of UIHostingController's to bridge our SwiftUI views.
1
0
780
Dec ’24
Need help with objc_fatalv crash
Hey there! My app's top crash is a mysterious one and I can't seem to figure it out. Hopefully someone here can shed some light. For context we use a lot of UIHostingController's to bridge our SwiftUI views. Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x13ec4 __abort_with_payload + 8 1 libsystem_kernel.dylib 0x33bec abort_with_payload_wrapper_internal + 104 2 libsystem_kernel.dylib 0x33b84 abort_with_payload_wrapper_internal + 30 3 libobjc.A.dylib 0xbea0 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116 4 libobjc.A.dylib 0xbe2c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 30 5 libobjc.A.dylib 0xb040 weak_register_no_lock + 396 6 libobjc.A.dylib 0xa9bc objc_initWeak + 440 7 libswiftCore.dylib 0x43abe8 swift_unknownObjectWeakInit + 92 8 SwiftUI 0xf40cc NavigationBridge_PhoneTV.pushTarget(isDetail:) + 376 9 SwiftUI 0xf9490 UIKitNavigationBridge.update(environment:) + 1060 10 SwiftUI 0x5b51c UIHostingController._update(environment:) + 156 11 SwiftUI 0x96a30 _UIHostingView.updateEnvironment() + 3484 12 SwiftUICore 0xa0d0a0 closure #1 in ViewRendererHost.updateGraph() + 364 13 SwiftUICore 0xa0ca08 ViewRendererHost.updateGraph() + 180 14 SwiftUICore 0xa0d7d4 closure #1 in ViewRendererHost.render(interval:updateDisplayList:targetTimestamp:) + 368 15 SwiftUICore 0xa0b0d4 ViewRendererHost.render(interval:updateDisplayList:targetTimestamp:) + 556 16 SwiftUI 0x8f1634 UIHostingViewBase.renderForPreferences(updateDisplayList:) + 168 17 SwiftUI 0x8f495c closure #1 in UIHostingViewBase.requestImmediateUpdate() + 72 18 SwiftUI 0xcc700 thunk for @escaping @callee_guaranteed () -> () + 36 19 libdispatch.dylib 0x2370 _dispatch_call_block_and_release + 32 20 libdispatch.dylib 0x40d0 _dispatch_client_callout + 20 21 libdispatch.dylib 0x129e0 _dispatch_main_queue_drain + 980 22 libdispatch.dylib 0x125fc _dispatch_main_queue_callback_4CF + 44 23 CoreFoundation 0x56204 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 24 CoreFoundation 0x53440 __CFRunLoopRun + 1996 25 CoreFoundation 0x52830 CFRunLoopRunSpecific + 588 26 GraphicsServices 0x11c4 GSEventRunModal + 164 27 UIKitCore 0x3d2eb0 -[UIApplication _run] + 816 28 UIKitCore 0x4815b4 UIApplicationMain + 340 29 (MyApp) 0x1a7e0 main + 8 (main.swift:8) 30 ??? 0x1bf97eec8 (Missing)
4
0
709
Dec ’24