openradar-mirror
openradar-mirror copied to clipboard
49289931: Action sheet causes LayoutConstraints warning
Description
Area: UIKit
Summary: Presenting a UIAlertController with style .actionSheet on an iPhone causes a LayoutConstraints warning to be logged.
Steps to Reproduce: Run the attached sample project on an iPhone device or simulator.
Expected Results: An action sheet should be displayed with no warnings.
Actual Results: The following warning is logged and a UIViewAlertForUnsatisfiableConstraints breakpoint is triggered: [LayoutConstraints] Unable to simultaneously satisfy constraints. ... ( "<NSLayoutConstraint:0x600001485a90 UIView:0x7fd59947db10.width == - 16 (active)>" )
Version/Build: iOS 12.2/16E227
Configuration/Notes: This does not occur on iOS 12.1, new with 12.2. Same warning with Objective-C and Swift 4.2
Product Version: 12.2 Created: 2019-03-26T21:00:05.913100 Originated: 2019-03-26T00:00:00 Open Radar Link: http://www.openradar.me/49289931
my code (objective-C) has exactly the same error, has been working for years until I updated to 12.2. I tried all stack overflow suggestions with no help. ( my code is for enterprise app, nothing to do with your project, just kind of surprised that UIalertcontroller presenting in iPhone as action sheet to show up the warnings, sorry if this is not the right place to post such a warning----if you find a solution, I'd believe you can help my app too, thanks)
( "<NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>" )
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>
when I used "preferredStyle:UIAlertControllerStyleActionSheet"
output: [LayoutConstraints] 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:0x283574d20 UIView:0x15bb5cc50.width == -16> )
it happened in iPhone 7 ,but simulator is OK
Seeing the same thing on an iPhone X running iOS 12.2 (16E227)
my code (objective-C) has exactly the same error, has been working for years until I updated to 12.2. I tried all stack overflow suggestions with no help. ( my code is for enterprise app, nothing to do with your project, just kind of surprised that UIalertcontroller presenting in iPhone as action sheet to show up the warnings, sorry if this is not the right place to post such a warning----if you find a solution, I'd believe you can help my app too, thanks)
( "<NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>" )
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x282e479d0 UIView:0x100f7dfc0.width == - 16 (active)>
Same warning(UIView width = -16
) here... No idea what to do...
Same here while presenting an alert controller an iPhone Xs Max simulator. Strange, as this constraints are set by UIKit.
Same here while presenting an action sheet alert controller an iPhone XR simulator.
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000031e5f90 UIView:0x7fd582417c50.width == - 16 (active)>
Same thing. Don't know what to do.
Unbelievable this still isn't fixed
I am also facing the same warning message not sure why it is coming.
I have present the UIAlertController without animation and warning got vanished.
controller.present(alertController, animated: false, completion: nil)
This issue is still not resolved.
Still not resolved
waiting for online wwdc 2020)))
Confirmed still happening on iPhone pro 13.5 simulator , xCode 11.5 (11E608c)
Thanks
still not resolved. iPhone 11 simulator on XCode 12.0 beta 2 (12A6163b)
have come across this same exact error as well within an actionsheet cordova plugin I'm debugging.
BTW, it crashes with me when trying on iPad.
Still not resolved
Still not resolved
Unbelievable this still isn't fixed
why would Apple fix this? and the brilliant part is that I am seeing this on SwiftUI.. hahaha
still not resolved. still get the -16 error when alert is used.
I love this, been here for years
OMG, still not resolved. Xcode 12.5.1, iPhoneX, iOS 14.4.2
Still not resolved on iPadOS 15.3, affecting Landscape mode in another app.