This can probably be reproduced in any project under the same basic conditions.
There is no reason to use the new UIWindow.init(windowScene:) on iPhone devices and should be reverted back to the old implementation using UIWindow.init(frame:).

iOS 14 device (parts of the view removed from screenshot)

iOS 13 simulator view debugger
I found a few problems with this issue:
Nope the suggested solution using UIWindow.init(frame:) didn't work. At least not for me when building a custom version of the SDK (6.32.2) with the suggested fix. Maybe it's a iOS 13+ issue in some other way.
When I try this myself with a custom window it does not happen on iOS 12, 13 nor 14. So the problem seems to be with firebase!?, but I don't know what's going wrong.
I created a custom view controller and presented it in a window with
func presentInWindow() -> UIWindow {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = self
window.windowLevel = .normal
window.isHidden = false
return window
}
I do keep a strong reference to the window while it's presented but firebase seems to do that as well (in a static property in FIRIAMRenderingWindowHelper.m)
My window is triggered from the same place as the firebaseAnalytics.logEvent("trigger", parameters: nil) event is triggered, but my window don't get the zero frame problem at all.
We are also experiencing very similar issue with having the message view completely misplaced. I think this issue started happening just lately by itself.
Xcode version: 11.6
Firebase SDK version: 6.33.0
Firebase Component: InAppMessaging
Installation method: CocoaPods
Screenshot: (the white rectangle is a button with text in white colour, which doesn't actually reflect the settings in Firebase console correctly)

Constraint errors:
2020-10-24 19:18:04.793598+0200 AppName[9248:14227304] [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:0x600000c47890 'Message Card View.centerX = centerX' message-card-view.centerX == UIView:0x7fa6714a1200.centerX (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c477f0 'Message Card View.leading = leadingMargin + 10' message-card-view.leading == UIView:0x7fa6714a1200.leadingMargin + 10 (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46ee0 'Title Label.leading = leading + 24' H:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46f30 'trailing = Title Label.trailing + 24' H:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-| (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e6c0 'UIView-Encapsulated-Layout-Width' UIView:0x7fa6714a1200.width == 0 (active)>",
"<NSLayoutConstraint:0x600000c47a70 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x6000016638e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':UIView:0x7fa6714a1200 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c46f30 'trailing = Title Label.trailing + 24' H:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-| (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>
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.
2020-10-24 19:18:04.794805+0200 AppName[9248:14227304] [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:0x600000c471b0 'Action Button.centerX = centerX' message-action-button.centerX == message-card-view.centerX (active, names: message-action-button:0x7fa67148c920, message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47160 'Action Button.centerX = Title Label.centerX' message-action-button.centerX == UILabel:0x7fa67149fd60'$1000 Prize Pool'.centerX (active, names: message-action-button:0x7fa67148c920 )>",
"<NSLayoutConstraint:0x600000c47890 'Message Card View.centerX = centerX' message-card-view.centerX == UIView:0x7fa6714a1200.centerX (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c477f0 'Message Card View.leading = leadingMargin + 10' message-card-view.leading == UIView:0x7fa6714a1200.leadingMargin + 10 (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46ee0 'Title Label.leading = leading + 24' H:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e6c0 'UIView-Encapsulated-Layout-Width' UIView:0x7fa6714a1200.width == 0 (active)>",
"<NSLayoutConstraint:0x600000c47a70 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x6000016638e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':UIView:0x7fa6714a1200 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c47160 'Action Button.centerX = Title Label.centerX' message-action-button.centerX == UILabel:0x7fa67149fd60'$1000 Prize Pool'.centerX (active, names: message-action-button:0x7fa67148c920 )>
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.
2020-10-24 19:18:04.815738+0200 AppName[9248:14227304] [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:0x600000c47890 'Message Card View.centerX = centerX' message-card-view.centerX == UIView:0x7fa6714a1200.centerX (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c477f0 'Message Card View.leading = leadingMargin + 10' message-card-view.leading == UIView:0x7fa6714a1200.leadingMargin + 10 (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e6c0 'UIView-Encapsulated-Layout-Width' UIView:0x7fa6714a1200.width == 0 (active)>",
"<NSLayoutConstraint:0x600000c47a70 'UIView-leftMargin-guide-constraint' H:|-(16)-[UILayoutGuide:0x6000016638e0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':UIView:0x7fa6714a1200 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c47890 'Message Card View.centerX = centerX' message-card-view.centerX == UIView:0x7fa6714a1200.centerX (active, names: message-card-view:0x7fa6714a0740 )>
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.
2020-10-24 19:18:04.817537+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c47b60 'actual height at runtime' modal-image-view.height == 144 (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c4d590 'Body Text View Height Constraint' message-body-textview.height == 100 (active, names: message-body-textview:0x7fa68192d000 )>",
"<NSLayoutConstraint:0x600000c470c0 'Body Text View.top = Image View.bottom + 24' V:[modal-image-view]-(24)-[message-body-textview] (active, names: message-body-textview:0x7fa68192d000, modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c46210 'Button Bottom To Container Bottom In Portrait Mode' V:[message-action-button]-(24)-| (active, names: message-card-view:0x7fa6714a0740, message-action-button:0x7fa67148c920, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47200 'Button Top To Body Bottom Constraint' V:[message-body-textview]-(24)-[message-action-button] (active, names: message-action-button:0x7fa67148c920, message-body-textview:0x7fa68192d000 )>",
"<NSLayoutConstraint:0x600000c46fd0 'Image Top To Title Bottom In Portrait Mode' V:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-[modal-image-view] (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c462b0 'Max Action Button Height' message-action-button.height == 36 (active, names: message-action-button:0x7fa67148c920 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47840 'Message Card View.top \U2265 Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == 34 (active)>",
"<NSLayoutConstraint:0x600000c46e90 'Title Label.top = top + 24' V:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c4d590 'Body Text View Height Constraint' message-body-textview.height == 100 (active, names: message-body-textview:0x7fa68192d000 )>
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.
2020-10-24 19:18:04.819335+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c47b60 'actual height at runtime' modal-image-view.height == 144 (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c470c0 'Body Text View.top = Image View.bottom + 24' V:[modal-image-view]-(24)-[message-body-textview] (active, names: message-body-textview:0x7fa68192d000, modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c46210 'Button Bottom To Container Bottom In Portrait Mode' V:[message-action-button]-(24)-| (active, names: message-card-view:0x7fa6714a0740, message-action-button:0x7fa67148c920, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47200 'Button Top To Body Bottom Constraint' V:[message-body-textview]-(24)-[message-action-button] (active, names: message-action-button:0x7fa67148c920, message-body-textview:0x7fa68192d000 )>",
"<NSLayoutConstraint:0x600000c46fd0 'Image Top To Title Bottom In Portrait Mode' V:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-[modal-image-view] (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c462b0 'Max Action Button Height' message-action-button.height == 36 (active, names: message-action-button:0x7fa67148c920 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47840 'Message Card View.top \U2265 Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == 34 (active)>",
"<NSLayoutConstraint:0x600000c46e90 'Title Label.top = top + 24' V:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c462b0 'Max Action Button Height' message-action-button.height == 36 (active, names: message-action-button:0x7fa67148c920 )>
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.
2020-10-24 19:18:04.820878+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c47b60 'actual height at runtime' modal-image-view.height == 144 (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c470c0 'Body Text View.top = Image View.bottom + 24' V:[modal-image-view]-(24)-[message-body-textview] (active, names: message-body-textview:0x7fa68192d000, modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c46210 'Button Bottom To Container Bottom In Portrait Mode' V:[message-action-button]-(24)-| (active, names: message-card-view:0x7fa6714a0740, message-action-button:0x7fa67148c920, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47200 'Button Top To Body Bottom Constraint' V:[message-body-textview]-(24)-[message-action-button] (active, names: message-action-button:0x7fa67148c920, message-body-textview:0x7fa68192d000 )>",
"<NSLayoutConstraint:0x600000c46fd0 'Image Top To Title Bottom In Portrait Mode' V:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-[modal-image-view] (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47840 'Message Card View.top \U2265 Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == 34 (active)>",
"<NSLayoutConstraint:0x600000c46e90 'Title Label.top = top + 24' V:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == 34 (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.
2020-10-24 19:18:04.821688+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c47b60 'actual height at runtime' modal-image-view.height == 144 (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c470c0 'Body Text View.top = Image View.bottom + 24' V:[modal-image-view]-(24)-[message-body-textview] (active, names: message-body-textview:0x7fa68192d000, modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c46210 'Button Bottom To Container Bottom In Portrait Mode' V:[message-action-button]-(24)-| (active, names: message-card-view:0x7fa6714a0740, message-action-button:0x7fa67148c920, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47200 'Button Top To Body Bottom Constraint' V:[message-body-textview]-(24)-[message-action-button] (active, names: message-action-button:0x7fa67148c920, message-body-textview:0x7fa68192d000 )>",
"<NSLayoutConstraint:0x600000c46fd0 'Image Top To Title Bottom In Portrait Mode' V:[UILabel:0x7fa67149fd60'$1000 Prize Pool']-(24)-[modal-image-view] (active, names: modal-image-view:0x7fa6714a08b0 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47840 'Message Card View.top \U2265 Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c46e90 'Title Label.top = top + 24' V:|-(24)-[UILabel:0x7fa67149fd60'$1000 Prize Pool'] (active, names: message-card-view:0x7fa6714a0740, '|':message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c470c0 'Body Text View.top = Image View.bottom + 24' V:[modal-image-view]-(24)-[message-body-textview] (active, names: message-body-textview:0x7fa68192d000, modal-image-view:0x7fa6714a08b0 )>
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.
2020-10-24 19:18:04.822788+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47840 'Message Card View.top \U2265 Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c47840 'Message Card View.top ≥ Top Layout Guide.bottom + 10' V:[_UILayoutGuide:0x7fa67148c560]-(>=10)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>
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.
2020-10-24 19:18:04.824429+0200 AppName[9248:14227304] [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.
(
"<_UILayoutSupportConstraint:0x600000c39f40 _UILayoutGuide:0x7fa67148c560.height == 20 (active)>",
"<_UILayoutSupportConstraint:0x600000c39ef0 V:|-(0)-[_UILayoutGuide:0x7fa67148c560] (active, names: '|':UIView:0x7fa6714a1200 )>",
"<NSLayoutConstraint:0x600000c477a0 'Message Card View.centerY = centerY' message-card-view.centerY == UIView:0x7fa6714a1200.centerY (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c47cf0 'Message Card View.top \U2265 Top Layout Guide.bottom + 24' V:[_UILayoutGuide:0x7fa67148c560]-(>=24)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>",
"<NSLayoutConstraint:0x600000c5e3a0 'UIView-Encapsulated-Layout-Height' UIView:0x7fa6714a1200.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c47cf0 'Message Card View.top ≥ Top Layout Guide.bottom + 24' V:[_UILayoutGuide:0x7fa67148c560]-(>=24)-[message-card-view] (active, names: message-card-view:0x7fa6714a0740 )>
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.
2020-10-24 19:18:04.827494+0200 AppName[9248:14227304] [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:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == - 43.2 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c46cb0 'Title Label Height Constraint' UILabel:0x7fa67149fd60'$1000 Prize Pool'.height == - 43.2 (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.
2020-10-24 19:18:04.827805+0200 AppName[9248:14227304] [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:0x600000c4d590 'Body Text View Height Constraint' message-body-textview.height == - 124.8 (active, names: message-body-textview:0x7fa68192d000 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000c4d590 'Body Text View Height Constraint' message-body-textview.height == - 124.8 (active, names: message-body-textview:0x7fa68192d000 )>
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.
@Mattijah What's the size of the window frame? If it's zero, it's probably the same issue i have.
I get the WoT of breaking constraints too.
@antonjn Yeah, it's zero. I think it was working ok like a week ago though... At least if I remember this correctly.
@antonjn By reverting changes I've managed to find out what causes this issue on my side. When the app starts, I call InAppMessaging.inAppMessaging().triggerEvent("event_name") and at the same time I also register for notifications by calling notificationCenter.requestAuthorization(). Requesting authorization makes a UIAlertController appear at pretty much the same time as when Firebase tries to present its message too. Now, I don't know how is this stuff handled in Firebase, but as we can see there is a possibility of a conflict that is currently not handled correctly.
Thanks for the report. I'll dig into this later this week.
@antonjn Could you provide a video with the gesture described here? I'm not able to reproduce.
Keep the app in foreground but start to put it in the background by swiping up just a little bit from the home indicator and keep your drag gesture when the IAM should be displayed.
RPReplay_Final1603987443.mov.zip
iPhone XS with iOS 14.0.1
In the simulator it's not misplaced but gone entirely, but you can still see that the window is zero and you'll get a bunch of breaking constraint warnings if the debugger is attached.
I see. And is this message being triggered by a foreground, or a custom event that happens to fire at that time?
custom event
@christibbs I think the problem itself will most likely be somewhere else since I was having the exactly same issue without having to put the app in the background. Not sure how is this window/vc being presented and sized.
Well some users seem to have this issue when the app comes to foreground, not all the time, but sometimes. I think it's related to background/foreground state in some way. But as I wrote before. I didn't get this problem when I did a quick test presenting my own custom VC in a window, so it seems to be somewhat related to firebase's implementation from my point of view.
Yeah, definitely. Calling notificationCenter.requestAuthorization() for example, also puts the app in the Foreground Inactive state and if you try to present the IAM at this time, the issue occurs.
@christibbs Have you been able to reproduce this issue?
I have exactly the same problem using react native. I also have the request authorization but I tried to delete it and the problem persist
I wasn't able to reproduce this when I tried a week ago, but I'll get back on it since there are other reports.
Ah, that might help. My tests have been on SceneDelegate apps.
Finally was able to repro this consistently. Working on it now.
I was able to fix @Mattijah's use case (triggering a system level alert at the same time as an in-app message) by using initWithFrame: instead of initWithWindowScene:. Seems reasonable enough to check for SceneDelegate vs AppDelegate and proceed accordingly.
@antonjn I still haven't reproduced your use case though. You mentioned it comes from swiping into background and back while using a custom trigger. What iOS lifecycle event are you firing the custom trigger from?
@christibbs
@antonjn Please re-open this if the issue persists after this fix.
@christibbs Seems to have solved our problem! 🎉
Thx and great job! 😄
Most helpful comment
Finally was able to repro this consistently. Working on it now.