openradar-mirror icon indicating copy to clipboard operation
openradar-mirror copied to clipboard

49289931: Action sheet causes LayoutConstraints warning

Open openradar-mirror opened this issue 5 years ago • 22 comments

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

openradar-mirror avatar Mar 26 '19 22:03 openradar-mirror

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)>

atcnf3000 avatar Apr 17 '19 16:04 atcnf3000

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

hapiii avatar Apr 23 '19 03:04 hapiii

Seeing the same thing on an iPhone X running iOS 12.2 (16E227)

EvanKaminsky avatar May 10 '19 07:05 EvanKaminsky

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...

weitieda avatar May 10 '19 14:05 weitieda

Same here while presenting an alert controller an iPhone Xs Max simulator. Strange, as this constraints are set by UIKit.

Spoonylein avatar May 26 '19 17:05 Spoonylein

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)>

lumanmann avatar Jun 13 '19 04:06 lumanmann

Same thing. Don't know what to do.

streem-ua avatar Jul 29 '19 19:07 streem-ua

Unbelievable this still isn't fixed

Jasperav avatar Jul 30 '19 20:07 Jasperav

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)

sunkumar avatar Aug 28 '19 11:08 sunkumar

This issue is still not resolved.

jasudev avatar Mar 01 '20 01:03 jasudev

Still not resolved

Mat-CauThon avatar May 08 '20 08:05 Mat-CauThon

waiting for online wwdc 2020)))

torburg avatar May 24 '20 19:05 torburg

Confirmed still happening on iPhone pro 13.5 simulator , xCode 11.5 (11E608c)

Thanks

mlucian avatar Jun 09 '20 13:06 mlucian

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.

erikyuzwa avatar Jul 21 '20 12:07 erikyuzwa

BTW, it crashes with me when trying on iPad.

MuhammadAAdam avatar Sep 21 '20 16:09 MuhammadAAdam

Still not resolved

bmaloha avatar Oct 05 '20 11:10 bmaloha

Still not resolved

andymedvedev avatar Oct 10 '20 05:10 andymedvedev

Unbelievable this still isn't fixed

why would Apple fix this? and the brilliant part is that I am seeing this on SwiftUI.. hahaha

KatkayApps avatar Nov 19 '20 03:11 KatkayApps

still not resolved. still get the -16 error when alert is used.

huazuhao avatar Nov 29 '20 21:11 huazuhao

I love this, been here for years

acamill avatar Jan 12 '21 07:01 acamill

OMG, still not resolved. Xcode 12.5.1, iPhoneX, iOS 14.4.2

dcracker avatar Jul 20 '21 08:07 dcracker

Still not resolved on iPadOS 15.3, affecting Landscape mode in another app.

kode54 avatar Feb 04 '22 09:02 kode54