2

I get the following warning only when I run my app and have Personal Hotspot enabled and therefore have the Personal Hotspot blue bar on the top of the screen. Is there a way of fixing this?

2016-05-19 09:07:55.589 RemindersPro[591:121237] 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:0x145d7ff30 V:|-(20)-[UIInputSetContainerView:0x145e77b70]   (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>",
    "<NSLayoutConstraint:0x145d307a0 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x145e77b70]   (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x145d7ff30 V:|-(20)-[UIInputSetContainerView:0x145e77b70]   (Names: '|':UITextEffectsWindow:0x145d7e8d0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
updating
reminderListsStructure of 24 calendars recreated.

I tried fixing it as recommended in In Call Status Bar (Unable to Satisfy Constraints) by adding the following function to my AppDelegate. Unfortunately, it didn't help.

func application(application: UIApplication, willChangeStatusBarFrame newStatusBarFrame: CGRect) {
    for window in UIApplication.sharedApplication().windows {
        if window.dynamicType.self.description().containsString("UITextEffectsWindow") {
            window.removeConstraints(window.constraints)
        }
    }
}
Community
  • 1
  • 1
Daniel
  • 3,758
  • 3
  • 22
  • 43

1 Answers1

0

The error means that 2 of the constraints you've added to the personal hotspot bar conflict with each other, meaning they tell the bar to go in two different places. Since this isn't possible, you see that error. In order to fix it, you'll have to look at the constraints you've added to the bar and see if two of them would put the bar in different places. Xcode actually gives you these two constraints that conflict, showing both of them in the error.

To get rid of all constraints try this:

func application(application: UIApplication, willChangeStatusBarFrame newStatusBarFrame: CGRect) {
    for window in UIApplication.sharedApplication().windows {
        window.removeConstraints(window.constraints)
    }
}
brimstone
  • 3,370
  • 3
  • 28
  • 49
  • I don't have any constraints on the Root View Controller. And I'm not setting any programmatically. How can I find out what's causing this and where these constraints are? – Daniel May 19 '16 at 07:05
  • @Daniel Try changing the code in App Delegate to remove constraints for ALL windows then – brimstone May 19 '16 at 11:16
  • how can I do that? – Daniel May 19 '16 at 14:33
  • Didn't work. Still getting the same error. I put a print statement in the beginning of the function so I can see that it does get called, but it doesn't fix the error... – Daniel May 20 '16 at 01:06