Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Activity

SwiftData predicate for many to many relationships?
Hello, I have a Task model in my application which has an optional many to many relationship to a User model. task.assignedUsers user.tasks I am looking to construct a SwiftData predicate to fetch tasks which either have no assigned users or assigned users does not contain specific user. Here is a partially working predicate I have now: static func assignedToOthersPredicate() -> Predicate<Task> { let currentUserGUID = User.currentUserGUID return #Predicate<Task> { task in task.assignedUsers.flatMap { users in users.contains(where: { $0.guid != currentUserGUID }) } == true } } This only returns tasks assigned to others, but not those which have no assigned users. If combine it with this: static func notAssignedPredicate() -> Predicate<Task> { return #Predicate<Task> { task in task.assignedUsers == nil } } Then I get a run time crash: "to-many key not allowed here" What is the proper way to do this? Thanks.
1
0
349
Mar ’25
MacOS Scale to view
on iOS you can choose to scale to view to have the app resize the screen easily in the developer environment. Scale to view is however not easily done on MacOS using NS to solve on MacOS now. Is it possible for the Apple developer team to make this easier for the Developer, as I understand it is for iOS applications?
0
0
274
Feb ’25
Loading a DNG into CIRAWFilter and use HDR
I have DNG files that I want to open and show as EDR content in my app. It seems like the DNG files should have enough per pixel information to show more colors that Display P3 but whenever I load the images using CIRawFilter and then inspect the outputImage color space it is always "DisplayP3", not something like "ITU-R BT.2100 PQ" there doesn't seem to be any way to make it load with a different color space for displaying EDR images. Does this make sense for DNG files, it seems like it should? If I open the same file using CIImage with the expandToHDR option e.g. CIImage(contentsOf: rawURL, options: [.expandToHDR: true]) then it does have the desired EDR color space, but then I don't get any of the properties that are available via the CIRAWFilter class to manipulate the data. Basically I just want to be able to open the DNG file via CIRAWFilter and then display it in my SwiftUI app as an EDR image by adding the allowedDynamicRange(.high) property. Image("my-dng-image").allowedDynamicRange(.high) Or do DNG files (just RAW not ProRAW) not contain enough information to be displayed as EDR images, seems like they should.
1
0
159
Mar ’25
Is it possible to automatically flip device orientation?
Hello togehter, i do have the following question. If I have my App run in landscape mode and a sheet view get's called, will it be possible to switch automatically from landscape mode in portrait mode and fix this device orientation? Once the sheet view get's dismissed or closed, the original view will come back and the device orientation shall switch back to landscape mode. Thanks you so much for your help!
0
0
249
Feb ’25
NSTextView and TextField becomes non clickable after a alert/menu is shown
I have a NSViewController as the root view and have a switui view embedded in it via NSHostingView. override func loadView() { self.view = NSHostingView(rootView: SwiftUiView()) } } In the SwiftUiView, I have a TextField and an NSTextView embedded using NSViewRepresentable, along with a few buttons. There is also a menu: Menu { ForEach(menuItems), id: \.self) { item in Button { buttonClicked() } label: { Text(item) } } } label: { Image("DropDown") .contentShape(Rectangle()) .frame(maxWidth: .infinity) .frame(maxHeight: .infinity) } The NSTextView and TextField work fine, and I can type in them until I click on the menu or show an alert. After that, I can no longer place my cursor in the text fields. I am able to select the text but not type in it. When I click on the NSTextView or TextField, nothing happens. At first, I thought it was just a cursor visibility issue and tried typing, but I received an alert sound. I've been trying to fix this for a couple of days and haven't found any related posts. Any help would be greatly appreciated.
1
0
253
Mar ’25
SwiftUI Transformable: support drag to Finder on macOS
I am trying to support dragging out a 'file' object from my app into Finder, on macOS. I have my object conform to Transferable and the files are saved on disk locally, so I just want to pass it the URL. This works fine when dragging out to other apps, like Notes or Mail, but not in Finder. I setup a ProxyRepresentation as well, as suggested by another thread, but it doesn't seem to help. Is there any other setup I need to do in the Xcode project file for it to work, or is there something else that I'm missing? @available(iOSApplicationExtension 17.0, macOSApplicationExtension 14.0, *) extension FileAttachments: Transferable { public static var transferRepresentation: some TransferRepresentation { FileRepresentation(exportedContentType: UTType.content) { content in SentTransferredFile(content.fullFileURL(), allowAccessingOriginalFile: false) } .exportingCondition { file in if let fileUTI = UTType(filenameExtension: file.fullFileURL().pathExtension), let fileURL = file.fullFileURL() { print("FileAttachments: FileRepresentation exportingCondition fileUTI: \(fileUTI) for file: \(fileURL)") return fileUTI.conforms(to: UTType.content) } return false } .suggestedFileName{$0.fileRenamedName} ProxyRepresentation { file in if let fileURL = file.fullFileURL() { print("FileAttachments: ProxyRepresentation returning file") return fileURL } return file.fullFileURL()! } } }
1
0
403
Feb ’25
Button Behavior between fullScreenCover and sheet
The behavior of the Button in ScrollView differs depending on how the View is displayed modally. When the View is displayed as a .fullScreenCover, if the button is touched and scrolled without releasing the finger, the touch event is canceled and the action of the Button is not called. On the other hand, if the View is displayed as a .sheet, the touch event is not canceled even if the view is scrolled without lifting the finger, and the action is called when the finger is released. In order to prevent accidental interaction, I feel that the behavior of .fullScreenCover is better, as it cancels the event immediately when scrolling. Can I change the behavior of .sheet? Demo movie is here: https://x.com/kenmaz/status/1896498312737611891 Sample code import SwiftUI @main struct SampleApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State private var showSheet = false @State private var showFullScreen = false var body: some View { VStack(spacing: 16) { Button("Sheet") { showSheet.toggle() } Button("Full screen") { showFullScreen.toggle() } } .sheet(isPresented: $showSheet) { SecondView() } .fullScreenCover(isPresented: $showFullScreen) { SecondView() } .font(.title) } } struct SecondView: View { @Environment(\.dismiss) var dismiss var body: some View { ScrollView { Button("Dismiss") { dismiss() } .buttonStyle(MyButtonStyle()) .padding(.top, 128) .font(.title) } } } private struct MyButtonStyle: ButtonStyle { func makeBody(configuration: Self.Configuration) -> some View { configuration .label .foregroundStyle(.red) .background(configuration.isPressed ? .gray : .clear) } }
Topic: UI Frameworks SubTopic: SwiftUI
0
0
189
Mar ’25
Crash: KEY_TYPE_OF_DICTIONARY_VIOLATES_HASHABLE_REQUIREMENTS
Hi everyone, frome time to time I see crash which Im not able to debug, because there is no line of my code where crash occured. This is a crash log what Im getting from time to time of some users. In my device I never get this kind of crash. 0 libswiftCore.dylib 0x1172c _assertionFailure(_:_:flags:) + 208 1 libswiftCore.dylib 0x198624 KEY_TYPE_OF_DICTIONARY_VIOLATES_HASHABLE_REQUIREMENTS(_:) + 2980 2 libswiftCore.dylib 0xdb6c8 specialized _NativeDictionary.uncheckedRemove(at:isUnique:) + 534 3 libswiftCore.dylib 0xb250c Dictionary._Variant.setValue(_:forKey:) + 204 4 libswiftCore.dylib 0x5a620 Dictionary.subscript.setter + 520 5 SwiftUICore 0xf62ec ForEachState.item(at:offset:) + 4340 6 SwiftUICore 0xf5054 ForEachState.forEachItem(from:style:do:) + 1796 7 SwiftUICore 0x2272f8 ForEachState.traitKeys.getter + 84 8 SwiftUICore 0x227298 ForEachList.traitKeys.getter + 24 9 SwiftUICore 0x227008 protocol witness for ViewList.traitKeys.getter in conformance SubgraphList + 76 10 SwiftUICore 0x227008 protocol witness for ViewList.traitKeys.getter in conformance SubgraphList + 76 11 SwiftUICore 0x227008 protocol witness for ViewList.traitKeys.getter in conformance SubgraphList + 76 12 SwiftUICore 0x227008 protocol witness for ViewList.traitKeys.getter in conformance SubgraphList + 76 13 SwiftUICore 0x2271fc DynamicViewList.WrappedList.traitKeys.getter + 88 27 SwiftUICore 0x226d18 specialized static SectionAccumulator.processUnsectionedContent(list:contentSubgraph:) + 84 28 SwiftUI 0x26afe0 ListSectionInfo.init(list:listAttribute:contentSubgraph:) + 132 29 SwiftUI 0x269bb0 UpdateCollectionViewListCoordinator.updateValue() + 1528 30 SwiftUI 0x785d4 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32 31 AttributeGraph 0xccac AG::Graph::UpdateStack::update() + 540 32 AttributeGraph 0xc870 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, unsigned int) + 424 33 AttributeGraph 0xc444 AG::Subgraph::update(unsigned int) + 848 34 SwiftUICore 0x805a8 GraphHost.flushTransactions() + 860 35 SwiftUI 0x1ac84 closure #1 in _UIHostingView._renderForTest(interval:) + 24 36 SwiftUICore 0x7ffa8 partial apply for closure #1 in ViewGraphDelegate.updateGraph<A>(body:) + 28 37 SwiftUICore 0x7fd6c ViewRendererHost.updateViewGraph<A>(body:) + 120 38 SwiftUICore 0x7fce8 ViewGraphDelegate.updateGraph<A>(body:) + 84 39 SwiftUI 0x3e688 closure #1 in closure #1 in closure #1 in _UIHostingView.beginTransaction() + 172 40 SwiftUI 0x3e5d4 partial apply for closure #1 in closure #1 in closure #1 in _UIHostingView.beginTransaction() + 24 41 SwiftUICore 0x79720 closure #1 in static Update.ensure<A>(_:) + 56 42 SwiftUICore 0x796a4 static Update.ensure<A>(_:) + 100 43 SwiftUI 0x9c808 partial apply for closure #1 in closure #1 in _UIHostingView.beginTransaction() + 80 44 SwiftUICore 0x7f5e0 thunk for @callee_guaranteed () -> () + 28 45 SwiftUICore 0x6161c specialized closure #1 in static NSRunLoop.addObserver(_:) + 144 46 CoreFoundation 0x218a4 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 47 CoreFoundation 0x213f8 __CFRunLoopDoObservers + 552 48 CoreFoundation 0x75da8 __CFRunLoopRun + 948 49 CoreFoundation 0xc8284 CFRunLoopRunSpecific + 588 50 GraphicsServices 0x14c0 GSEventRunModal + 164 51 UIKitCore 0x3ee674 -[UIApplication _run] + 816 52 UIKitCore 0x14e88 UIApplicationMain + 340 53 SwiftUI 0x291ef8 closure #1 in KitRendererCommon(_:) + 168 54 SwiftUI 0x291e28 runApp<A>(_:) + 100 55 SwiftUI 0x291d0c static App.main() + 180 56 DholRainbow 0x3019e8 main + 4339145192 (DholRainbowApp.swift:4339145192) 57 ??? 0x1b0bf5de8 (Missing) From Crashlytics I know at least human readable format of this error Fatal error: Duplicate keys of type 'Contact' were found in a Dictionary. This usually means either that the type violates Hashable's requirements, or that members of such a dictionary were mutated after insertion. I 've checked all my parts of code where Im using dictionary. This is a function which creating that particulary dictionary. private func logsByDate() { let groupedByDate = Dictionary(grouping: logs.filter { ($0.remoteParty as? Contact != nil) } ) { $0.date.removeTimeStamp ?? .distantPast }.mapValues { $0.compactMap { $0 } } var dayLogs = [DayLog]() for date in groupedByDate { var contacts = [CallLogContact]() for log in logs.filter({ $0.date.removeTimeStamp ?? .distantPast == date.key }) { if let contact = log.remoteParty as? Contact { if contacts.firstIndex(where: {$0.contact == contact }) == nil { let contactDayLogs = logs.filter({ $0.remoteParty as? Contact == contact && $0.date.removeTimeStamp == date.key}) contacts.append( CallLogContact( contact: contact, logs: contactDayLogs, lastCallLogDate: contactDayLogs.sorted(by: {$0.date > $1.date}).first?.date ?? .distantPast ) ) } } } dayLogs.append(DayLog(date: date.key, contact: contacts)) } DispatchQueue.main.async { self.groupedCallLogs = dayLogs } } This function is called from 3 others functions based on notification from the server in case of new call log, fetched call logs and removed call logs.
0
0
287
Mar ’25
Closure with typed throws stored as a View property crashes on iOS 17
I've encountered an issue where storing a throws(PermissionError) closure as a property inside a SwiftUI View causes a runtime crash on iOS 17, while it works correctly on iOS 18. Here’s an example of the affected code: enum PermissionError: Error { case denied } struct PermissionCheckedView<AllowedContent: View, DeniedContent: View>: View { var protectedView: () throws(PermissionError) -> AllowedContent var deniedView: (PermissionError) -> DeniedContent init( @ViewBuilder protectedView: @escaping () throws(PermissionError) -> AllowedContent, @ViewBuilder deniedView: @escaping (PermissionError) -> DeniedContent ) { self.protectedView = protectedView self.deniedView = deniedView } public var body: some View { switch Result(catching: protectedView) { case .success(let content): content case .failure(let error): deniedView(error) } } } @main struct TestApp: App { var body: some Scene { WindowGroup { PermissionCheckedView { } deniedView: { _ in } } } } Specifically this is the stack trace (sorry for the picture I didn't know how to get the txt): If I use var protectedView: () throws -> AllowedContent without typed throws it works.
2
0
301
Feb ’25
Why my app clips is Unavailable
My App Clip is associated with three domains: • nfc.ttwifi.net • qr.ttwifi.net Currently, I’m experiencing an issue where scanning a QR code from qr.ttwifi.net correctly launches my App Clip. However, when I scan a QR code from nfc.ttwifi.net, it successfully displays the App Clip card but then shows the message “App Clip unavailable.” I checked the Website Status in App Store Connect, and both domains have their Debugging Status and Cache Status marked as Verified. One important detail to note: Yesterday, while submitting a new version for review, I noticed that nfc.ttwifi.net showed “Unable to connect to AASA file” in the Cache Status in App Store Connect. The cache status update time was March 27, 2025, at 6:52 PM. However, when I checked today, both domains appeared to be fine, and the cache status update time was March 27, 2025, at 7:07 PM. How can I restore the App Clip functionality for my nfc.ttwifi.net domain?
6
0
210
Apr ’25
NSHostingController menu not activated
I'm attempting to write a macOS version of https://stackoverflow.com/a/74935849/2178159. From my understanding, I should be able to set the menu property of an NSResponder and it will automatically show on right click. I've tried a couple things: A: set menu on an NSHostingController's view - when I do this and right or ctrl click, nothing happens. B: set menu on NSHostingController directly - when I do this I get a crash Abstract method -[NSResponder setMenu:] called from class _TtGC7SwiftUI19NSHostingControllerGVS_21_ViewModifier_...__. Subclasses must override C: manually call NSMenu.popup in a custom subclasses of NSHostingController or NSView's rightMouseDown method - nothing happens. extension View { func contextMenu(menu: NSMenu) -> some View { modifier(ContextMenuViewModifier(menu: menu)) } } struct ContextMenuViewModifier: ViewModifier { let menu: NSMenu func body(content: Content) -> some View { Interaction_UI( view: { content }, menu: menu ) .fixedSize() } } private struct Interaction_UI<Content: View>: NSViewRepresentable { typealias NSViewType = NSView @ViewBuilder var view: Content let menu: NSMenu func makeNSView(context: Context) -> NSView { let v = NSHostingController(rootView: view) // option A - no effect v.view.menu = menu // option B - crash v.menu = menu return v.view } func updateNSView(_ nsView: NSViewType, context: Context) { // part of option A nsView.menu = menu } }
0
0
276
Mar ’25
How do we pass a selected item to a sheet?
I have view showing a list of contacts. When the user taps one, I want to raise a sheet that shows the contact's phone numbers and E-mail addresses and lets the user pick one. When the user taps a list entry, I store the associated Contact object into a @State variable called selectedContact. Then I set the boolean that's bound to the sheet modifier's isPresented flag. That modifier: .sheet(isPresented: $showContactMethodSheet, content: { ContactMethodView(withContact: selectedContact!) }) But the app crashes, because despite selectedContact having been set. It looks like the sheet was pre-built with a nil selected contact upon view load. Why, and what is the expected approach here?
Topic: UI Frameworks SubTopic: SwiftUI
3
0
243
Mar ’25
SwiftUI + OSlog breaks previews in Swift 6
import SwiftUI import OsLog let logger = Logger(subsystem: "Test", category: "Test") struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .task { logger.info("Hallo") } } } #Preview { ContentView() } 27 | .padding() 28 | .task { 29 | logger.info(__designTimeString("#6734_2", fallback: "Hallo")) | `- error: argument must be a string interpolation 30 | } 31 | } Should OsLog be compatible with __designTimeString?
1
0
130
Mar ’25
app crashing in iPad Only
app crashing in iPad Only and not getting help from logs Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016d667fd0 Exception Codes: 0x0000000000000002, 0x000000016d667fd0 VM Region Info: 0x16d667fd0 is in 0x16d664000-0x16d668000; bytes after start: 16336 bytes before end: 47 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_SMALL 132c00000-133000000 [ 4096K] rw-/rwx SM=PRV GAP OF 0x3a664000 BYTES ---> STACK GUARD 16d664000-16d668000 [ 16K] ---/rwx SM=NUL stack guard for thread 0 Stack 16d668000-16d764000 [ 1008K] rw-/rwx SM=SHM thread 0 Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [10927] Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 UIKitCore 0x186fae04c __66-[UITraitCollection _traitCollectionByModifyingTraitsCopyOnWrite:]_block_invoke_2 + 4 1 UIKitCore 0x186faefdc __54-[UITraitCollection traitCollectionByModifyingTraits:]_block_invoke + 36 2 UIKitCore 0x186fabfc8 -[UITraitCollection _traitCollectionByModifyingTraitsCopyOnWrite:] + 252 3 UIKitCore 0x187109b08 -[UITraitCollection traitCollectionByModifyingTraits:] + 120 4 UIKitCore 0x1871c013c -[UIScreen _defaultTraitCollectionForInterfaceOrientation:inBounds:] + 224 5 UIKitCore 0x1871bff8c -[UIApplication _isOrientationVerticallyCompact:] + 48 6 UIKitCore 0x1871bcd28 -[UIApplication _isStatusBarHiddenForOrientation:] + 24 7 UIKitCore 0x186fe0d10 +[UIWindow(StatusBarManager) _prefersStatusBarHiddenInWindow:targetOrientation:animationProvider:] + 260 8 UIKitCore 0x186fe310c +[UIWindow(StatusBarManager) _prefersStatusBarHiddenInWindow:animationProvider:] + 72 9 UIKitCore 0x186fe2e00 -[UIApplication _isStatusBarEffectivelyHiddenForContentOverlayInsetsForWindow:] + 132 10 UIKitCore 0x186fe0a9c -[UIWindow _sceneSafeAreaInsetsIncludingStatusBar:] + 184 11 UIKitCore 0x187037628 -[UIWindow _normalizedSafeAreaInsets] + 64 12 UIKitCore 0x1870375a0 -[UIWindow safeAreaInsets] + 76 13 UIKitCore 0x186fa6c70 -[UIView _updateSafeAreaInsets] + 68 14 UIKitCore 0x188529824 -[UIView _recursiveEagerlyUpdateSafeAreaInsetsUntilViewController] + 176
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
411
Mar ’25
NSWritingToolsCoordinator can't complete proofreading.
I am revising my app to support NSWritingToolsCoordinator/ NSWritingToolsCoordinatorDelegate. When proofreading some paragraphs, it works well. But, when proofreading many paragraphs (for example, 56 paragraphs), it can't complete the proofreading. I am not sure which is wrong with my app or macOS API. I think I implemented all NSWritingToolsCoordinatorDelegate methods. Is there any information for such an issue? Phenomenon For paragraphs 1-9, text animation completed. But, for paragraphs 10-56, text animation does not complete. It shows 5 corrected items, but I can't jump to items 3, 4, 5, when I click the ">" button in the "Proofread" window. Items 3, 4, 5 were not corrected actually. Log For each NSWritingToolsCoordinatorDelegate method, the method name and main arguments are output by NSLog. requestsContextsForScope willChangeToState newState:2 requestsPreviewForTextAnimation range:(0, 18233) prepareForTextAnimation range:(0, 18233) willChangeToState newState:3 requestsPreviewForTextAnimation range:(0, 18233) finishTextAnimation range:(0, 18233) requestsPreviewForRect requestsPreviewForTextAnimation range:(0, 1837) replaceRange proposedText:an range:(208, 2) replaceRange proposedText:you range:(443, 4) prepareForTextAnimation range:(1836, 16396) requestsPreviewForTextAnimation range:(0, 1836) requestsBoundingBezierPathsForRange range:(208, 2) requestsBoundingBezierPathsForRange range:(443, 3) requestsPreviewForRect prepareForTextAnimation range:(0, 1836) prepareForTextAnimation range:(1836, 0) finishTextAnimation range:(1836, 16396) requestsPreviewForTextAnimation range:(1836, 16396) requestsBoundingBezierPathsForRange range:(208, 2) requestsBoundingBezierPathsForRange range:(443, 3) prepareForTextAnimation range:(1836, 16396) finishTextAnimation range:(0, 1836) finishTextAnimation range:(0, 1836) replaceRange proposedText:an range:(208, 2) requestsUnderlinePathsForRange range:(208, 2) requestsUnderlinePathsForRange range:(443, 3) selectRanges ranges.count:1 requestsBoundingBezierPathsForRange range:(208, 2) replaceRange proposedText:an range:(208, 2) requestsUnderlinePathsForRange range:(208, 2) requestsUnderlinePathsForRange range:(443, 3) selectRanges ranges.count:1 replaceRange proposedText:you range:(443, 3) requestsUnderlinePathsForRange range:(208, 2) requestsUnderlinePathsForRange range:(443, 3) selectRanges ranges.count:1 requestsBoundingBezierPathsForRange range:(443, 3) replaceRange proposedText:you range:(443, 3) requestsUnderlinePathsForRange range:(208, 2) requestsUnderlinePathsForRange range:(443, 3) selectRanges ranges.count:1 macOS version is 15.3.1 (24D70)
1
0
336
Feb ’25
Crash in __UIKitSharedArtworkManager
Hi, We have received reports about crash when creating a UIButton: let button = UIButton(type: .infoLight) The exception is bad access: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000074 Exception Codes: 0x0000000000000001, 0x0000000000000074 VM Region Info: 0x74 is not in any region. Bytes before following region: 4298211212 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 100318000-100324000 [ 48K] r-x/r-x SM=COW /var/containers/Bundle/Application/E8912E1B-FFD8-49AF-A78A-7AA8805FDB95/My App/My App Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [550] and the main thread is crashing with the following stack trace: Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 UIKitCore 0x197e27a58 ____UIKitSharedArtworkManager_block_invoke + 116 1 libdispatch.dylib 0x19cfe2fa8 _dispatch_client_callout + 20 2 libdispatch.dylib 0x19cfe47f4 _dispatch_once_callout + 32 3 UIKitCore 0x197c3bb10 __UIKitSharedArtworkManager + 64 4 UIKitCore 0x197c3b5b0 _UIImageWithNameAndTraitCollection + 172 5 UIKitCore 0x197cbc180 _UIImageWithName + 44 6 UIKitCore 0x197c3be80 +[UIImage _systemImageNamed:fallback:withConfiguration:] + 132 7 UIKitCore 0x197a8c550 +[UIButton _defaultImageForType:andState:withConfiguration:] + 360 8 UIKitCore 0x197c1bc38 +[UIButton buttonWithType:] + 124 9 MapboxMaps 0x105f23fdc InfoButtonOrnament.init() + 400 10 MapboxMaps 0x105f2424c @objc InfoButtonOrnament.init() + 20 11 MapboxMaps 0x105fd8d80 MapView.setupManagers() + 1476 12 MapboxMaps 0x105fd8788 MapView.commonInit(mapInitOptions:overridingStyleURI:) + 1284 13 MapboxMaps 0x105fe2bcc specialized MapView.init(frame:mapInitOptions:) + 1500 14 MapboxMaps 0x105fd78cc MapView.init(frame:mapInitOptions:) + 20 15 mapbox_maps_flutter 0x10858c1dc MapboxMapController.init(withFrame:mapInitOptions:channelSuffix:registrar:pluginVersion:eventTypes:) + 496 16 mapbox_maps_flutter 0x10858f274 specialized MapboxMapFactory.create(withFrame:viewIdentifier:arguments:) + 2312 17 mapbox_maps_flutter 0x10858e8e8 @objc MapboxMapFactory.create(withFrame:viewIdentifier:arguments:) + 128 18 Flutter 0x10a99eb88 0x10a980000 + 125832 19 Flutter 0x10af474bc 0x10a980000 + 6059196 20 Flutter 0x10a9c3d38 0x10a980000 + 277816 21 libdispatch.dylib 0x19cfe1248 _dispatch_call_block_and_release + 32 22 libdispatch.dylib 0x19cfe2fa8 _dispatch_client_callout + 20 23 libdispatch.dylib 0x19cff1a34 _dispatch_main_queue_drain + 984 24 libdispatch.dylib 0x19cff164c _dispatch_main_queue_callback_4CF + 44 25 CoreFoundation 0x19529abcc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 26 CoreFoundation 0x1952971c0 __CFRunLoopRun + 1996 27 CoreFoundation 0x1952e9284 CFRunLoopRunSpecific + 588 28 GraphicsServices 0x1e25554c0 GSEventRunModal + 164 29 UIKitCore 0x197e32674 -[UIApplication _run] + 816 30 UIKitCore 0x197a58e88 UIApplicationMain + 340 31 My App 0x1003244e8 main + 64 32 dyld 0x1bb541de8 start + 2724 Has anyone experienced this? Could it be a bug in UIKit? Cheers, Roman Laitarenko
Topic: UI Frameworks SubTopic: UIKit
4
0
340
Feb ’25
Issue with Parent selecting child's apps using Family Controls API
I'm trying to accomplish the features in this video where the child device requests permission from parent to control scren time. Then the parent can choose apps on the childs phone from their phone. Everything on the childs device is working exactly like in the video. However, on the parents phone, when the FamilyActivityPicker appears, it's only the apps on the parents phone and when an app is selected, nothing changes in the FamilyActivitySelection. I found this forum post describe the same issue I am having. I have a physical device logged in the child and a simulator running as the parent. Why can't I see the child's apps on the parents phone? Is it cause I'm running one of them on a simulator?
2
0
502
Mar ’25
Missing tab bar after switching tabs when tab bar is hidden in initial tab
Hi, I'm experiencing the behaviour outlined below. When I navigate programmatically on iPadOS or macOS from a tab that hides the tab bar to another tab, the tab bar remains hidden. The real app has it's entry point in UIKit (i.e. it uses an UITabBarController instead of a SwiftUI TabView) but since the problem is reproducible with a SwiftUI only app, I used one for the sake of simplicity. import SwiftUI @main struct HiddenTabBarTestApp: App { @State private var selectedIndex = 0 var body: some Scene { WindowGroup { TabView(selection: $selectedIndex) { Text("First Tab") .tabItem { Label("1", systemImage: "1.circle") } .tag(0) NavigationStack { Button("Go to first tab") { selectedIndex = 0 } .searchable(text: .constant("")) } .tabItem { Label("2", systemImage: "2.circle") } .tag(1) } } } } Reproduction: Create a new SwiftUI App with the iOS App template and use the code from above Run the app on iPadOS or macOS Navigate to the second tab Click into the search bar Click the "Go to first tab" button The tab bar is no longer visible Is this a bug in the Framework or is it the expected behaviour? If it's the expected behaviour, do you have a good solution/workaround that doesn't require me to end the search programmatically (e.g. by using @Environment(\.dismissSearch)) before navigating to another tab? The goal would be to show the tab bar in the first tab while keeping the search open in the second tab.
1
0
296
Mar ’25
Label from ApplicationToken Inside of DeviceActivityReport Not Showing
tl;dr can we use Label(application token) inside of a DeviceActivityReport? I’m working on an app that uses the DeviceActivityReport extension to show a user’s screen time breakdown. The app was working fine in a setup where my main app had the Distribution Family Controls capability and all the extensions had the Development Family Controls capability. However, this caused provisioning issues when I tried to create a test flight build. I then removed the development capabilities from the extensions, and now everything works fine except oddly the Labels in the DeviceActivityReport no longer show anything. They worked fine before, and the same label logic is working 100% fine inside my main app. Anyone encounter this before?
1
0
233
Mar ’25