Thank you for your response and for the suggestions.
Here are the case I tried.
- Create simple app on tvOS (26.0) in Swift (interface=storyboard)
XCode v26.3
tvOS v26.0
- Update ViewController.swift file
import UIKit
import AVKit
class ViewController: UIViewController {
let playerViewController = AVPlayerViewController()
let button: UIButton = {
let btn = UIButton(type: .system)
btn.setTitle("Show video", for: .normal)
btn.translatesAutoresizingMaskIntoConstraints = false
return btn
}()
override func viewDidLoad() {
super.viewDidLoad()
configureButton()
}
func configureButton() {
view.addSubview(button)
NSLayoutConstraint.activate([
button.centerXAnchor.constraint(equalTo: view.centerXAnchor),
button.centerYAnchor.constraint(equalTo: view.centerYAnchor)
])
button.addTarget(
self,
action: #selector(showVideo),
for: .primaryActionTriggered
)
}
@objc func showVideo() {
present(playerViewController, animated: true)
}
}
After button is pressed:
`UIScene` lifecycle will soon be required. Failure to adopt will result in an assert in the future.
UITextView 0x105823800 is switching to TextKit 1 compatibility mode because its layoutManager was accessed. Break on void _UITextViewEnablingCompatibilityMode(UITextView *__strong, BOOL) to debug.
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:0x60000213d3b0 UIStackView:0x105546170.width >= 217 (active)>",
"<NSLayoutConstraint:0x60000213d400 H:|-(>=95)-[UIStackView:0x105546170] (active, names: '|':UIView:0x105544280 )>",
"<NSLayoutConstraint:0x60000213d450 UIStackView:0x105546170.trailing == UIView:0x105544280.trailing - 95 (active)>",
"<NSLayoutConstraint:0x60000213d590 H:|-(0)-[UIView:0x105544280] (active, names: '|':_AVFocusContainerView:0x105524a70 )>",
"<NSLayoutConstraint:0x60000213d5e0 UIView:0x105544280.trailing == _AVFocusContainerView:0x105524a70.trailing (active)>",
"<NSLayoutConstraint:0x60000213e710 '_UITemporaryLayoutWidth' _AVFocusContainerView:0x105524a70.width == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000213d3b0 UIStackView:0x105546170.width >= 217 (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.
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:0x60000213d400 H:|-(>=95)-[UIStackView:0x105546170] (active, names: '|':UIView:0x105544280 )>",
"<NSLayoutConstraint:0x60000213d450 UIStackView:0x105546170.trailing == UIView:0x105544280.trailing - 95 (active)>",
"<NSLayoutConstraint:0x60000213d590 H:|-(0)-[UIView:0x105544280] (active, names: '|':_AVFocusContainerView:0x105524a70 )>",
"<NSLayoutConstraint:0x60000213d5e0 UIView:0x105544280.trailing == _AVFocusContainerView:0x105524a70.trailing (active)>",
"<NSLayoutConstraint:0x60000213e710 '_UITemporaryLayoutWidth' _AVFocusContainerView:0x105524a70.width == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000213d450 UIStackView:0x105546170.trailing == UIView:0x105544280.trailing - 95 (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.
Setting modalPresentationStyle once <AVPlayerViewController: 0x106026000> has been presented will have no effect until it is dismissed and presented again.

BTW, I get no warnings when I test it on iOS.