TwitterKit iOS TWTRVideoPlayerView auto layout errors


#1

Hi

I am getting some layout errors when using an embedded TWTRTimelineViewController on iOS 11. These seem to be related to the TWTRVideoPlayerView, an example of what i get below:

[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:0x604000680140 h=–& v=–& TWTRVideoPlayerView:0x7fae92fe0010.width == 0 (active)>",
"<NSLayoutConstraint:0x60400049e870 UIButton:0x7fae92d4ed30.width == 24 (active)>",
"<NSLayoutConstraint:0x60400049e7d0 UILabel:0x7fae92cdaa60’1:01’.width == 41.5898 (active)>",
"<NSLayoutConstraint:0x60400049e780 UILabel:0x7fae92cdaa60’1:01’.leading == UILayoutGuide:0x6040005af5e0’UIViewLayoutMarginsGuide’.leading NSSpace(0) (active)>",
"<NSLayoutConstraint:0x60400049e820 H:[UILabel:0x7fae92cdaa60’1:01’]-(>=10)-[UIButton:0x7fae92d4ed30] (active)>",
"<NSLayoutConstraint:0x60400049e8c0 UILayoutGuide:0x6040005af5e0’UIViewLayoutMarginsGuide’.trailing == UIButton:0x7fae92d4ed30.trailing NSSpace(0) (active)>",
"<NSLayoutConstraint:0x60000049a400 H:|-(0)-[TWTRVideoControlsView:0x7fae92d47f30] (active, names: ‘|’:UIView:0x7fae92fe24e0 )>",
"<NSLayoutConstraint:0x60000049a450 H:[TWTRVideoControlsView:0x7fae92d47f30]-(0)-| (active, names: ‘|’:UIView:0x7fae92fe24e0 )>",
"<NSLayoutConstraint:0x60000049a2c0 H:|-(0)-[UIView:0x7fae92fe24e0] (active, names: ‘|’:TWTRVideoPlayerView:0x7fae92fe0010 )>",
"<NSLayoutConstraint:0x60000049a310 H:[UIView:0x7fae92fe24e0]-(0)-| (active, names: ‘|’:TWTRVideoPlayerView:0x7fae92fe0010 )>",
"<NSLayoutConstraint:0x60400049e5f0 ‘UIView-leftMargin-guide-constraint’ H:|-(8)-UILayoutGuide:0x6040005af5e0’UIViewLayoutMarginsGuide’ (active, names: ‘|’:TWTRVideoControlsView:0x7fae92d47f30 )>",
"<NSLayoutConstraint:0x60400049e690 ‘UIView-rightMargin-guide-constraint’ H:[UILayoutGuide:0x6040005af5e0’UIViewLayoutMarginsGuide’]-(8)-|(LTR) (active, names: ‘|’:TWTRVideoControlsView:0x7fae92d47f30 )>"
)

Just wondered if anybody else is getting this, i am using the latest TwitterKit SDK.


#2

I’ve been seeing those messages too, but so far I haven’t noticed any layout issues. I’ve seen hundreds of videos and animated GIFs that have looked fine. Note: I’m using TWTRTweetView within my own UITableView, not the TWTRTimelineViewController.


#3

I’m also getting conflicting constraints logs…Has anyone worked around it?