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

Critical Rendering Bug in PencilKit on iPad with "More Space" Display Mode & Apple Pencil Hover Interaction
There is a significant rendering issue in PencilKit when using an iPad set to "More Space" display mode, combined with an Apple Pencil that supports hover functionality (e.g., Apple Pencil 2). This problem affects all applications that use PencilKit, including Apple's own Notes and Quick Note. The issue results in flickering black borders and subtle jittering while drawing, which is especially noticeable during tasks requiring precise handwriting, such as writing mathematical expressions. Due to the short strokes and frequent lifts and drops of the pencil, the jitter is much more pronounced, leading to visual discomfort and even dizziness after extended use. Steps to Reproduce: Open Settings on your iPad. Navigate to Display & Brightness > Display Zoom > More Space. Switch to the More Space display mode. Open the Notes app or trigger Quick Note from any application by swiping from the bottom-right corner. Start drawing or writing using the Apple Pencil (with hover functionality) in the writing area. Observe the display anomalies as you hover and write: Flickering black borders appear intermittently around the writing area. The strokes show subtle jittering whenever you lift and lower the pencil. This is particularly disruptive when writing short, precise strokes, such as those in mathematical expressions, where the frequent up-and-down motion makes the jitter more apparent. Expected Results: Smooth and stable drawing experience with no visual artifacts or jittering during interactions with the Apple Pencil, regardless of the display zoom settings. Actual Results: Flickering black borders intermittently appear during drawing. Jittering of strokes is noticeable, particularly when lifting and lowering the Apple Pencil for short strokes. This disrupts precise writing tasks, especially in cases like mathematical notation, where frequent pen lifts and short strokes make the jitter much more apparent. This can lead to discomfort (e.g., dizziness) after extended use. System-Wide Impact: This issue affects all apps that utilize PencilKit, including third-party apps such as Doodle Draw (link). Since PencilKit is a core framework, the rendering bug significantly degrades the user experience across multiple productivity and note-taking applications. Similar Reports: There are numerous discussions about this issue online, indicating that many users are experiencing the same problem. Reddit Discussion: https://www.reddit.com/r/ipad/comments/1f042ol/comment/ljvilv6/ Apple Support Thread Additionally, a feedback report (ID: FB15166022) related to this issue with Notes has been previously filed, but the bug remains unresolved. This bug severely impacts the usability of PencilKit-enabled apps, especially during tasks that involve frequent, precise pencil strokes, such as writing mathematical expressions. We kindly request the development team investigate this issue promptly to ensure a smooth, stable experience with the iPad's "More Space" display mode and Apple Pencil hover interaction.
1
0
112
4d
NSAttributedString.enumerateAttribute(_:in) crashes with custom attribute in macOS Sequoia
The following code crashes on macOS 15 Sequoia: import Foundation let key = NSAttributedString.Key("org.example.key") let value = Value() let string = NSMutableAttributedString() string.append(NSAttributedString(string: "a", attributes: [:])) string.append(NSAttributedString(string: "b", attributes: [key: value])) string.append(NSAttributedString(string: "c", attributes: [:])) string.enumerateAttribute(key, in: NSRange(location: 0, length: string.length)) { value, range, stop in print(range) } class Value: Equatable, Hashable { static func == (lhs: Value, rhs: Value) -> Bool { return lhs === rhs } func hash(into hasher: inout Hasher) { hasher.combine(ObjectIdentifier(self)) } } The error is EXC_BAD_ACCESS (code=1, address=0x0) I wanted to run it on my external macOS 14 partition to confirm that it didn't crash before updating to macOS 15, but for some reason macOS will just restart and boot again into macOS 15. So I tried with macOS 13, which I was allowed to start for some reason, and I was able to confirm that the code doesn't crash. Is this a known issue, and is there a workaround? Removing the two lines that add the letters a and c, or just declaring class Value without conformance to Equatable, Hashable, interestingly, solves the issue.
4
0
107
5d
Core Data: Behavior of newBackgroundContext() and Parent-Child Relationships
Hi everyone, I’m wondering about Core Data. When creating a private context using newBackgroundContext(), does it automatically set the parent to the view context, or is it independent? Additionally, if I update objects in the context created by newBackgroundContext(), will the view context automatically notice the changes, and vice versa? Lastly, are there other ways to set parent-child context relationships between contexts? I'd appreciate it if anyone could clarify this for me. Thanks in advance! 😊
0
0
49
5d
Calling `requestAuthorization(options:completionHandler:)` in Swift 6 leads to `EXC_BAD_INSTRUCTION` crash.
I am in the process of evaluating Swift 6 and I noticed that when using the completion handler version of the requestAuthorization the application crashes with EXC_BAD_INSTRUCTION exception. Using this code: let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound, .badge]) { success, error in print(success) } Crashes when the project is build with Swift 6 and works normalising when build with Swift 5. The only solution that I have found so far is to switch to using the async version of that API: Task { let center = UNUserNotificationCenter.current() do { if try await center.requestAuthorization(options: [.alert, .sound, .badge]) == true { print("success") } else { print("fail") } } catch { print("Error") } } Is the a known issue? I have submitted feedback with ID "FB15294185".
2
0
127
5d
(iOS 17 & 18) Using QLPreviewController in specific app, added text colour reverts to black on text edit
In the company that I work we have a huge app and we have implemented an image annotation feature using the QLPreviewController but there is a bug where even with an OOTB implementation of the QLPreviewController, when I add a text, change the colour of that text and then double click on the text to edit it, it reverts back to black. I tried the same implementation in a sample app but I couldn't reproduce the bug hence it is not a bug with the library but something with the app interacting with the library. I was wondering if anyone can provide any suggestion with what the reason may be, as sadly I cannot provide any code examples as that would break company code. From my research what I found strange is that when I double click the coloured text and it goes to black, then undo it its as if that was not a recorded event as the undo goes back to the step before the text was coloured meaning it replaces the colour changing event rather than recording it as a new event that can be undone. If any has any suggestion please help me as I am quite stuck. 🙏
1
0
160
1w
AccessorySetupKit - Removing accessory inconsistencies
Hello everyone, I am using the new AccessorySetupKit, and whenever I try to remove an accessory I sometimes get an alert asking me to make sure if I want to remove the accessory from my device. The problem is that this alert sometimes shows up, and sometimes it does not. The removal of the accessory does work, it is just that the alert is not predictable. Is this expected behavior? How can we “predict” when it will show up and when it will not?
0
0
154
1w
QuickLookPreviewController generates lots of constraint warnings
I have been using the QLPreviewController in an app for some time now and have always gotten a flurry of constraint warnings when it launches which I have ignored. I have looked at them and don't believe they are due to my code and the app seems to work. Tried to attach a simple app that loads a ViewController with a single button that when pressed creates an object that generates and displays a CSV file via QLPreviewController but can't. First warning: Invalid content type identifier com.apple.pktransaction specified in extension com.apple.Passbook.QuicklookPreviewExtension Second warning: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x60000213ae40 h=-&- v=--& UINavigationBar:0x10621ddf0.minY == 0 (active, names: '|':UILayoutContainerView:0x106208830 )>", "<NSAutoresizingMaskLayoutConstraint:0x60000213ae90 h=-&- v=--& UINavigationBar:0x10621ddf0.height == 44 (active)>", "<NSLayoutConstraint:0x600002137890 V:[UINavigationBar:0x10621ddf0]-(0)-[UIFocusContainerGuide:0x600003d04000'UINavigationControllerContentFocusContainerGuide'] (active)>", "<NSLayoutConstraint:0x600002137020 UIFocusContainerGuide:0x600003d04000'UINavigationControllerContentFocusContainerGuide'.bottom == UILayoutContainerView:0x106208830.bottom (active)>", "<NSLayoutConstraint:0x6000021366c0 V:|-(0)-[UILayoutContainerView:0x106208830] (active, names: QLPreviewControllerView:0x10631de80, '|':QLPreviewControllerView:0x10631de80 )>", "<NSLayoutConstraint:0x600002134d20 V:[UILayoutContainerView:0x106208830]-(0)-| (active, names: QLPreviewControllerView:0x10631de80, '|':QLPreviewControllerView:0x10631de80 )>", "<NSLayoutConstraint:0x60000211dcc0 'UIView-Encapsulated-Layout-Height' QLPreviewControllerView.height == 0 (active, names: QLPreviewControllerView:0x10631de80 )>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002137890 V:[UINavigationBar:0x10621ddf0]-(0)-[UIFocusContainerGuide:0x600003d04000'UINavigationControllerContentFocusContainerGuide'] (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. dealloc Query controller [A899BAB1-6730-4B7D-9CBE-488EC6641B6B] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x6000021229e0 h=--& v=--& _UIToolbarContentView:0x10641e920.width == 0 (active)>", "<NSLayoutConstraint:0x60000213a6c0 H:|-(0)-[_UIButtonBarStackView:0x106507620] (active, names: '|':_UIToolbarContentView:0x10641e920 )>", "<NSLayoutConstraint:0x60000213a710 H:[_UIButtonBarStackView:0x106507620]-(0)-| (active, names: '|':_UIToolbarContentView:0x10641e920 )>", "<NSLayoutConstraint:0x600002146bc0 'IB_Leading_Leading' H:|-(16)-[_UIModernBarButton:0x106519cd0] (active, names: '|':_UIButtonBarButton:0x106519ab0 )>", "<NSLayoutConstraint:0x600002146c60 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x106519cd0]-(16)-| (active, names: '|':_UIButtonBarButton:0x106519ab0 )>", "<NSLayoutConstraint:0x600002147f70 'UISV-canvas-connection' UILayoutGuide:0x600003b050a0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x106519ab0.leading (active)>", "<NSLayoutConstraint:0x60000213b020 'UISV-canvas-connection' UILayoutGuide:0x600003b050a0'UIViewLayoutMarginsGuide'.trailing == UIView:0x10651c300.trailing (active)>", "<NSLayoutConstraint:0x60000213bde0 'UISV-spacing' H:[_UIButtonBarButton:0x106519ab0]-(0)-[UIView:0x10651c300] (active)>", "<NSLayoutConstraint:0x60000213a5d0 'UIView-leftMargin-guide-constraint' H:|-(0)-[UILayoutGuide:0x600003b050a0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UIButtonBarStackView:0x106507620 )>", "<NSLayoutConstraint:0x60000213a670 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003b050a0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x106507620 )>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002146c60 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x106519cd0]-(16)-| (active, names: '|':_UIButtonBarButton:0x106519ab0 )> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( "<NSLayoutConstraint:0x6000021374d0 UILayoutGuide:0x600003b21340'TitleView(layout=0x106416a30)'.leading >= UILayoutGuide:0x600003b216c0'UIViewLayoutMarginsGuide'.leading (active)>", "<NSLayoutConstraint:0x6000021372f0 UILayoutGuide:0x600003b21340'TitleView(layout=0x106416a30)'.trailing <= UILayoutGuide:0x600003b216c0'UIViewLayoutMarginsGuide'.trailing (active)>", "<NSLayoutConstraint:0x60000216ce60 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x106416700.width == 0 (active)>", "<NSLayoutConstraint:0x600002134f50 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x600003b216c0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UINavigationBarContentView:0x106416700 )>", "<NSLayoutConstraint:0x600002134b90 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003b216c0'UIViewLayoutMarginsGuide']-(16)-|(LTR) (active, names: '|':_UINavigationBarContentView:0x106416700 )>" ) Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000021372f0 UILayoutGuide:0x600003b21340'TitleView(layout=0x106416a30)'.trailing <= UILayoutGuide:0x600003b216c0'UIViewLayoutMarginsGuide'.trailing (active)> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
1
0
122
1w
Unable to import Charts in Xcode 16.1 beta 2
Failed to build module 'Charts'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.41 clang-1600.0.24.1)', while this compiler is 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.11 clang-1600.0.26.2)'). Please select a toolchain which matches the SDK. Any fix yet?
1
2
155
1w
Square Notification Box
Apparently, the half-a-sec boxy notification issue remains up until now??? Please help fix the bug, Apple Dev. how come an issue from ios 16 still happening now in ios 18? reference: https://www.reddit.com/r/ios/s/Qx116rGBzM
0
0
63
1w
Home Screen Icons
Now that we are finally able to customize our home screen, can you disable the auto relocation feature? Making it extremely difficult to customize home screen when things are still moving around automatically. Thanks.
1
0
89
1w
MapkitJS browser errors related to Place ID functionality
Hello, I am building a web app using Mapkit JS, and have something up an running where I can add markers and annotate places with Place ID (I followed along with the WWDC24 video). However occasionally, while I'm doing nothing on the browser, I get an runtime error with the following error trace (from developer tools in Chrome). === Uncaught TypeError: Cannot read properties of null (reading 'tint') at get tint (mapkit.core.annotations.d43c86.js:2:97102) at get colorScheme (mapkit.core.annotations.d43c86.js:2:81602) at e.exports.PlaceCardController._renderPlaceIframe (mapkit.core.map.536988.js:2:214785) at e.exports.PlaceCardController.update (mapkit.core.map.536988.js:2:212978) at e.exports.PlaceCardController._handleConfigChanged (mapkit.core.map.536988.js:2:213284) at _handleConfigChangedListener (mapkit.core.map.536988.js:2:212679) at n.dispatchEvent (mapkit.core.js:2:16624) at mapkit.core.js:2:10799 === It is completely random, and not a result of any browser / Map interaction. Seems to be an issue in mapkit.core, and related to Place IDs. Can anyone help with this?
1
0
124
1w
How to get new push token for Live Activity using input-push-token option
The documentation doesn't state how to get the new APNs push token that is associated with a Live Activity that is started via an APNs push notification. I have been able to get the new token by listening to all instances of the Live Activities for my attribute type, but it makes me wonder how the "input-push-token" option for iOS 18 is supposed to work. Is there another way to retrieve the newly created Live Activity push token when using "input-push-token"?
1
1
172
2w