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.
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
Is it possible to disable user interaction for items in a CarPlay template? Based on my research, it seems that touch interaction is controlled by the system UI, and there isn't an API available to disable it.
Hi,
I am trying out the new UITabBar stuff in iOS18, and I don't think it'll be a good fit for my app. Is there a way to revert to the old iPad UITabBar look and placement that we've been using before? I don't want to make such a big change like this just yet, but I would need to make other changes to the app as well and I don't want to use the new UITabBar just yet. Is there a way to achieve this?
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".
The SF Symbols app 6.0 (99) does not export the ‘Can Rotate’ property of layers when exporting a symbol via File > Export Symbol.
Without this, all the new fantastic edit functions in the app related to rotating in SF Symbols is completely useless.
This issue with the SF Symbols 6 app can be reproduced by exporting a rotatable symbol like fan.desk, and then by importing the result as custom symbol. When inspecting ‘Group 1’ of the imported symbol, it is no longer marked as rotatable.
SF Symbols app 6.0 is still in beta, but hasn't been updated since 10 June. Hopefully this bug will be solved in the release version, or earlier.
Does anyone know how to manually add the missing rotation info to the exported SVG file?
In case an Apple engineer reads this: FB13916635
Hi everyone,
I'm working with the CarPlay TabBar template in my app. Is there a way to programmatically switch between tabs, or is this only possible through user interaction?
Any guidance or clarification would be appreciated. Thanks!
Hi everyone,
I'm working with the CarPlay TabBar template in my app. Is there a way to programmatically switch between tabs, or is this only possible through user interaction?
Any guidance or clarification would be appreciated. Thanks!
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.
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.
Hello. I am having trouble trying to create a control in control center view that opens a specific view in my app using AppIntents (iOS18 )and WidgetKit, can someone help me please? I feel like the original videos and documentations are incomplete.
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! 😊
`struct OpenMainAppIntent: AppIntent {
static let title: LocalizedStringResource = "OpenMainAppIntent"
static var openAppWhenRun: Bool = true
init() {}
@MainActor
func perform() async throws -> some IntentResult & OpensIntent {
guard let url = URL(string: "myapp://open") else {
throw OpenURLError.invalidURL
}
return .result(opensIntent: OpenURLIntent(url))
}
}
`
This is an action in my custom control widget, and i want to use this deeplink open my application and get the link's info, but it won't perform onOpenURL
`@main
struct TestControlWidgetApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { url in
print("url: \(url)")
}
}
}
}`
Setting bundle data(pList)is not displaying under our app after iPadOS 18 upgrade. Before the iPadOS upgrade the settings was appearing in the app setting sections. Setting section is broken after the iPadOS 18 upgrade. Is this the known issue and how do we get the setting section back?
When trying to look for an app in the search view, when write only the letter S everything is crashing and cleaning the search
https://photos.app.goo.gl/A7HfaPG1oQGUCTk89
Is there a time limit for the perform method execution in iOS? I'm implementing App Intents that call an API from the perform method. Based on my testing, it works fine if the API completes within 10 seconds. However, if it takes longer, Siri ends the process with an error.
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. 🙏
Is there a trick to getting the new Live Activities on Apple Watch working via the simulator? I have an iPhone paired to a watch simulator, but live activities created on the phone aren't appearing on the watch Smart Stack.
It looks like maybe the Smart Stack isn't functional on the watch simulator, as there are a bunch of blank tiles where the Smart Stack should be.
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?
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?
I'm adding support for Genmoji to my app but it's unclear to me if this is something that should be called manually in code to insert an adaptive image glyph or if this is something that the system calls when the user inserts a Genmoji / adaptive image glyph object (ie. sticker) into the UITextView.