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!
General
RSS for tagExplore 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
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?
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.
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?
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>
Dear my fellow developer,
Question:
why viewDidLayoutSubviews is getting called when I kill the app? is that normal?
That behavior only happens on this device:
iPhone 8
iPhone SE
On the newer iPhone that will not happen.
Thank you
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])
}
}
I updated to iPadOS 18.2, i have a iPad Pro M2 11 inch, and this is what happens, can someone explain on how to fix this. (this is for users and Apple Developers only)
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
[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.
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
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?
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
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
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.
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.
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
Hi!
So while Date is supported for @Parameter in an App Intent, I just discovered that Xcode will not let me use use it in a parametrized App Shortcut phrase.
In my case, I would like to give the option to say "today", tomorrow", or "day after tomorrow" for the date. Am I missing something? Any hints on the best way to approach this?
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!
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 }