Home Features Docs Blog Support GitHub

Warning when running libgdx with MOE 1.4.0 on iPhone X Simulator

(Leejjon) #1

I get a funny message in the logs:

2017-10-13 00:15:59.120932+0200 Bluff Poker[51451:1999192] [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.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
"<NSAutoresizingMaskLayoutConstraint:0x60000028bae0 h=--& v=--& UIView:0x7f88b45097a0.height == 20   (active)>",
"<NSLayoutConstraint:0x60400009dce0 V:|-(0)-[UILayoutGuide:0x6040001ae460'cutout']   (active, names: '|':UIView:0x7f88b45097a0 )>",
"<NSLayoutConstraint:0x60400009df60 UILayoutGuide:0x6040001ae460'cutout'.height == 30   (active)>",
"<NSLayoutConstraint:0x600000292480 V:[UILayoutGuide:0x6040001ae460'cutout']-(3)-[UILayoutGuide:0x6000007a6120'']   (active)>",
"<NSLayoutConstraint:0x600000292570 UILayoutGuide:0x6000007a6120''.bottom == UIView:0x7f88b45097a0.bottom   (active)>"
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000292480 V:[UILayoutGuide:0x6040001ae460'cutout']-(3)-[UILayoutGuide:0x6000007a6120'']   (active)>
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.

Is this on the MOE or libgdx side?

The app still works, but there are black bars on the top and bottom:

(Bart Pelle) #2

It’s related to the recent iPhone release - there’s a chunk (as you can see) that has the camera and speaker and it’s literally inside your screen at the top.

I haven’t seen that myself, but I think it’s on MOE’s end, and somewhere in your XCode settings I think you have to tell the host whether the application is aware of the “masked gap”. I assume it considers an app not explicitly saying it is aware of it as unaware, but I’m not sure what specifically this setting would be or where it is. When I get back to work tomorrow I’ll look at it and see if I can figure it out. Good to know, since we want to target those iPhones too.


(Bart Pelle) #3

While I was quickly Googling around I found an article that may help you for now:

(Leejjon) #4

Well, I’m getting e-mails from Apple on how to adjust my application for iPhone X, but obviously these instructions are for regular Swift applications. I hope they won’t reject my app when I put it in review in the current state.

I actually want to keep the app exactly how it looks now, but maybe have the extra parts use the same background color.

Edit: It doesn’t seem to be a problem for reviewers (yet). Because my app got accepted: