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.

Post

Replies

Boosts

Views

Activity

iPad - Bluetooth Peripheral MTU No More Than 20 Bytes
All, Thanks in advance! I'm having a very hard time increasing the MTU to any value beyond 20. The research I've done states iOS 16.1 and beyond supports up to 512 bytes. Yet, the peripheral device will only read 20 bytes. It's to be noted that I'm using Expo SDK 51 Bare Workflow, and the react-native-ble-plx library. I have the app functioning as both Central and Peripheral on iOS 18.1 devices, and data is successfully being written and read to the characteristic. Because the Expo app is Bare Workflow, I'm able to make any configurations via Xcode, and if there is any patches needed to the react-native-ble-plx library, we have the architecture to support that too. I wanted to provide that context before being recommended to go to the Expo forums (which I have/will be). I also added the CoreBluetooth framework to the project in hopes that would overwrite the react-native-ble-plx imports, but I noticed react-native-ble-plx uses Swift while CoreBluetooth is Objective-C. Looking forward to your responses!
0
0
42
21h
App crash when using SwiftUI view in UICollectionView
Several users are seeing a crash that occurs when configureCell is called for a UICollectionView. This seems to occur specifically for cells that add SwiftUI views using UIHostedConfiguration. 0 libsystem_kernel.dylib 0xc1d4 __pthread_kill + 8 1 libsystem_pthread.dylib 0x7ef8 pthread_kill + 268 2 libsystem_c.dylib 0x77ad8 abort + 128 3 libswiftCore.dylib 0x3cc1a4 swift::fatalError(unsigned int, char const*, ...) + 134 4 libswiftCore.dylib 0x3cc1c4 swift::warningv(unsigned int, char const*, char*) + 30 5 libswiftCore.dylib 0x3cc810 swift_beginAccess + 538 6 libswiftCore.dylib 0x3cc864 swift_beginAccess + 84 7 SwiftUI 0x947a0 _UIHostingView._rootView.getter + 92 8 SwiftUI 0x94668 _UIHostingView.makeRootView() + 432 9 SwiftUI 0x943b8 _UIHostingView.updateRootView() + 264 10 SwiftUICore 0xa0d000 closure #1 in ViewRendererHost.updateGraph() + 204 11 SwiftUICore 0x1f1308 partial apply for thunk for @escaping @callee_guaranteed () -> () + 28 12 AttributeGraph 0x144a8 AGGraphWithUpdate + 84 13 SwiftUICore 0x4a5f60 @objc closure #1 in closure #1 in closure #1 in static Update.syncMain(_:) + 84 14 SwiftUICore 0x3620 wait_for_lock + 112 15 SwiftUICore 0x3588 _MovableLockLock + 68 16 SwiftUICore 0x5bb6d4 _ViewList_ReleaseElements.deinit + 64 17 SwiftUICore 0x5bb838 _ViewList_ReleaseElements.__deallocating_deinit + 16 18 libswiftCore.dylib 0x3d783c _swift_release_dealloc + 56 19 libswiftCore.dylib 0x3d8950 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 160 20 SwiftUICore 0x7cf7bc assignWithTake for _ViewList_View + 52 21 SwiftUICore 0x18dbe0 assignWithTake for ExclusiveGesture + 76 22 SwiftUI 0x13aff8 outlined assign with take of ModifiedContent<TableRowView, CollectionViewCellModifier> + 100 23 SwiftUI 0x1394fc specialized PlatformListCell<>.defaultConfigureContent(_:transaction:) + 296 24 SwiftUI 0xb8308 CollectionViewListDataSource.configureCell(_:transaction:context:) + 1200 25 SwiftUI 0xb8e20 ShadowListDataSource.configureCell(_:transaction:context:) + 1336 26 SwiftUI 0xb670c closure #1 in UICollectionViewListCoordinatorBase.updateListContents(_:) + 452 27 SwiftUI 0xead7b4 partial apply for closure #1 in ListCoreDataSource.visitRowAt<A>(_:visitor:) + 32 28 SwiftUI 0xb6160 partial apply for closure #1 in ListCoreDataSource.visitRowAt<A>(_:visitor:) + 16 29 SwiftUI 0x171e1c Optional.map<A, B>(_:) + 516 30 SwiftUI 0xb98d8 ListCoreDataSource.visitRowAt<A>(_:visitor:) + 1064 31 SwiftUI 0x33b3c ListCoreDataSource.visitContent<A>(atRow:visitor:) + 536 32 SwiftUI 0xb5478 UICollectionViewListCoordinatorBase.updateListContents(_:) + 1696 33 SwiftUI 0x942dac closure #1 in performUpdates #1 <A, B>() in UICollectionViewListCoordinatorBase.update(_:to:transaction:performDiff:) + 416 34 SwiftUI 0x3261cc thunk for @escaping @callee_guaranteed (@unowned Bool) -> () + 48 35 SwiftUI 0x94cf88 closure #1 in UpdateCoalescingCollectionView.performBatchUpdates(_:completion:) + 308 36 SwiftUI 0x3261cc thunk for @escaping @callee_guaranteed (@unowned Bool) -> () + 48 37 UIKitCore 0x2b9bbc -[UICollectionView _updateAnimationDidStop:finished:] + 1240 38 UIKitCore 0xa02c38 __118-[UICollectionView _startViewAnimationsWithContext:oldVisibleViews:viewAnimator:viewAnimationsCompletedDispatchGroup:]_block_invoke + 36 39 UIKitCore 0x7d788 __47-[UICollectionViewAnimation startWithAnimator:]_block_invoke_3 + 272 40 UIKitCore 0x7bfb0 __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ + 36 41 UIKitCore 0x7be94 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 624 42 UIKitCore 0x7abb0 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436 43 UIKitCore 0x86f38 -[UIViewAnimationState animationDidStop:finished:] + 192 44 QuartzCore 0x4e3cc run_animation_callbacks(void*) + 132 45 libdispatch.dylib 0x40d0 _dispatch_client_callout + 20 46 libdispatch.dylib 0x129e0 _dispatch_main_queue_drain + 980 47 libdispatch.dylib 0x125fc _dispatch_main_queue_callback_4CF + 44 48 CoreFoundation 0x56204 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 49 CoreFoundation 0x53440 __CFRunLoopRun + 1996 50 CoreFoundation 0x52830 CFRunLoopRunSpecific + 588 51 GraphicsServices 0x11c4 GSEventRunModal + 164 52 UIKitCore 0x3d2eb0 -[UIApplication _run] + 816 53 UIKitCore 0x4815b4 UIApplicationMain + 340 The crashes started occurring in October and only for iOS 18 users (all versions from 18.0.0 to 18.2.0). We have several cell types that use SwiftUI views and I haven't been able to isolate the issue to any particular cell type. I have tried setting contentConfiguration = nil in prepareForReuse but this didn't help. Has there been a change in UICollectionView/UIHostingConfiguration in iOS 18? Any ideas on how this can be further investigated or resolved?
0
0
93
1d
LaunchScreen Storyboard layout issue on iPhone 16 Pro Max
I currently face an Issue where the SafeAreaInsets on the iPhone 16 Pro Max is not respected on LaunchScreens. Lets say you have an ImageView whose leading, trailing and top are equal to the SafeAreaLayoutGuides leading, trailing and top. Then you have a SwiftUI View such as the following representing the same layout in code: GeometryReader { reader in ZStack { VStack(spacing: 0) { Spacer(minLength: 0) .frame(height: reader.safeAreaInsets.top) Image(decorative: "splashLogo") Spacer(minLength: 0) } .frame(width: reader.size.width) } .edgesIgnoringSafeArea(.all) } Both the storyboard preview as well as the SwiftUI preview show identical results in Xcode. Launching the app on the device however briefly shows the image below the Dynamic Island cutout until the app is launched to the SwiftUI view. Noticed this only happening on the iPhone 16 Pro Max.
0
0
64
1d
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?
0
0
75
3d
CloudKit error - CKErrorRequestRateLimited
First query works fine. If next query comes within 30 seconds of first query it generates a CKErrorRequestRateLimited (error.code==7) error telling me to try after a time such that there would be 30 seconds between queries. <CKError 0x30299dd70: "Request Rate Limited" (7/2061); "Operation throttled by previous server http 503 reply. Retry after 20.5 seconds. (Other operations may be allowed.)"; Retry after 20.5 seconds>
1
0
90
5d
How to Get the Selected Tab in CPTabBarTemplate When Clicking a Tab in CarPlay?
Hi everyone, I'm developing a CarPlay application and using a CPTabBarTemplate to display multiple tabs. I want to determine which tab is selected when the user clicks on a tab, specifically when switching to the second tab. Here’s the relevant part of my code: class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { var interfaceController: CPInterfaceController? var tabBarTemplate: CPTabBarTemplate = CPTabBarTemplate(templates: []) func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController ) { self.interfaceController = interfaceController // Create and set the TabBarTemplate let tabBarTemplate = createTabBarTemplate() self.tabBarTemplate = tabBarTemplate interfaceController.setRootTemplate(tabBarTemplate, animated: false) { success, error in if let error = error { print("Error setting TabBarTemplate: \(error.localizedDescription)") } else { print("TabBarTemplate set successfully.") } } } func createTabBarTemplate() -> CPTabBarTemplate { let listItem1 = CPListItem(text: "Item 1", detailText: "Detail 1") let listItem2 = CPListItem(text: "Item 2", detailText: "Detail 2") let listTemplate = CPListTemplate( title: "List", sections: [CPListSection(items: [listItem1, listItem2])] ) let gridButton1 = CPGridButton( titleVariants: ["Grid 1"], image: UIImage(systemName: "star.fill")! ) let gridButton2 = CPGridButton( titleVariants: ["Grid 2"], image: UIImage(systemName: "star")! ) let gridTemplate = CPGridTemplate( title: "Grid", gridButtons: [gridButton1, gridButton2] ) return CPTabBarTemplate(templates: [listTemplate, gridTemplate]) } }
1
0
128
1w
Screen capture notification in MacOs catalyst
We have a IOS app and we are using the same app for Mac Catalyst. In IOS we are able to detect when user take the screenshot using UIApplicationUserDidTakeScreenshotNotification. But in MACCatalyst it is not working. As per docs UIApplicationUserDidTakeScreenshotNotification and UIScreenCapturedDidChangeNotification are both supported for MacCatalyst 13.1+. But I am not getting screen shot notifications using both
2
0
116
1w
Regarding the display of AppleArcade access points when playing iOS apps on visionOS.
[The problem that is occurring] The game apps in development are compatible with iOS, macOS, tvOS, and visionOS. In the Game app under development, the AppleArcade access point is placed in the main menu. In visionOS, when the main menu is opened, the GameCenter dashboard is automatically launched within 1~2 seconds after the main menu is displayed. This condition occurs every time the menu is re-opened. On iOS, macOS, and tvOS, the dashboard appears after pressing the GameCenter access point icon. [What you want to solve] We would like to make it so that the Game Center dashboard is launched after the access point icon is pressed on visionOS as it is on other operating systems. Or, if there is a standard implementation method for visionOS, please let us know.
1
0
187
1w
UI Bug in Family Sharing
System Settings is recommending I review the settings for my two children. The UI has a bug where it always opens the top most child even if I select the bottom of the two. Was present in 15.1.1 and is still present after installing 15.2
1
0
110
2w
Xcode auto completion
Greetings all, Would anyone be able to assist and tell me why on my desktop Button( auto completion shows 1 choice () (action: @escaptin () -> Void, label: @escaping () -> Label) while on my laptop, Button( auto completion shows more choices, starting with I (_ configuration:) I (action:label:) etc.... How do I get my desktop to act like my laptop?
1
0
114
2w
Dock tile plugin and app groups
In one of my apps I use an app group to share data between the app and a command line tool. This works as expected. The app also contains a Dock Tile plugin and I wonder if there's a way to access the group container from this plugin? Thanks in advance for your help. Best regards, Marc
1
0
115
2w
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
164
2w
Cannot lauch Share Extension from Photos
I am encountering an issue where the Share Extension in my app fails to launch intermittently. In my project, NSExtensionPrincipalClass is set to ComposeShellVC. When the Share Extension launches successfully, the following log entry appears, indicating that ComposeShellVC is being created: 09:21:09.339190+0800 2254529 ViewServices com.apple.UIKit compose-shareextension Received request to create view controller: self: <_UIViewServiceViewControllerOperator: 0x109194c00>; class: compose_shareextension.ComposeShellVC; contextToken: 42EA1BDB-5CDF-4EBD-8503-8A9A04BCE41C However, when the bug happens, this entry is absent during the failed launches. Additionally, I am unable to set breakpoints within the Share Extension to further investigate. Could you provide guidance on the next steps to diagnose this issue? Any advice on debugging techniques or tools that can help pinpoint the cause of this behavior would be greatly appreciated.
2
0
129
2w
How to save/share an iOS system screenshot to the active app?
I have my app accepting images shared from Photos but from the screenshot editor, my app icon does not show as a destination for the screenshot. Do I have to build an app extension or app intent catcher to then pass along the screenshot? It the problem that the screenshot editor is a modal sheet holding my app interface. I want to catch the screenshot in background for processing.
2
0
152
2w
Focused element for mail/notes app
I want to get the content present in a note or a mail thread when my cursor is in it on macos. (In the focused element). But I don't succeed to get any element from both mail and notes using : let result = AXUIElementCopyAttributeValue(appRef, kAXFocusedUIElementAttribute as CFString, &focusedElement) Even when I want to check the available attribute : let result = AXUIElementCopyAttributeNames(element, &attributeNames) I got AXUIElementCopyAttributeNames result: AXError(rawValue: -25204) But I have the write permission because when I am running AXIsProcessTrusted() to see if I got accessible permission it don't throw an error Is it possible to do it that way or I have to change
0
0
144
2w
Compatibility Issues with Ext JS 4.0 and Sencha Touch 2.0 in iOS 18.2 Beta – Legacy JavaScript Support and Rendering Problems
Hello, I am encountering compatibility issues with older JavaScript frameworks, specifically Ext JS 4.0 and Sencha Touch 2.0, after upgrading to iOS 18.2 Beta. My application, which was working fine on previous versions of iOS, is now experiencing rendering issues, broken touch events, and performance degradation on WebKit in iOS 18.2. The issues I’m seeing include: Sencha Touch 2.0: The UI elements (like fields, and lists) are not interactive or showing their content properly. There also seems to be a delay in rendering touch events. This seem to no longer work as expected with the updated WebKit engine in iOS 18.2 Beta. My Questions: Are there any known issues with legacy JavaScript frameworks like Ext JS 4.0 and Sencha Touch 2.0 on iOS 18.2 Beta? Specifically, do these frameworks rely on older DOM methods or JavaScript features that might be deprecated in the latest WebKit engine? Has Apple officially deprecated any JavaScript features or DOM methods in WebKit that might be causing these issues? If so, are there recommended workarounds or updates to ensure compatibility with iOS 18.2? Is there a way to enable legacy JavaScript features or fallback modes in iOS 18.2 ? I would appreciate any guidance on this, as we are facing significant issues with our app’s performance and UI since upgrading to iOS 18.2. Thank you!
3
5
291
2w
iOS 18 MapKit discrepancy between physical devices and simulators
I have noticed a discrepancy between behavior on physical devices and simulators in iOS 18. I am using the latest MapKit APIs to fetch MKMapItems using the following MKLocalSearch: private func performLocalSearch(_ query: String) async throws -> [MKMapItem] { let request = MKLocalSearch.Request() request.naturalLanguageQuery = query let search = MKLocalSearch(request: request) return try await search.start().mapItems } This returns an array of MKMapItem on both the simulator and physical device. The key difference is my physical device (iOS 18.1.1) is missing the MKMapItem's identifier value. On the simulator, identifier is always populated in addition to my search. Any ideas on how to resolve this? The new MapKit API for those curious: @available(iOS 6.0, *) open class MKMapItem : NSObject { @available(iOS 18.0, *) open var identifier: MKMapItem.Identifier? { get }
1
0
203
3w