How can this be resolved - load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1)

I'm programming my constraints in my video game, which is working good so far until I ran into my most important interactive storyboard. I have three buttons that move back and forth on the Y position each time they are hit. The buttons Y positions only change to view.safeAreaLayoutGuide.centerYAnchor, constant: 100 or view.safeAreaLayoutGuide.centerYAnchor, constant: 200 or view.safeAreaLayoutGuide.centerYAnchor, constant: 300

The strange part is the button that is in the Y 100 stays visible and I can hit the button that is in the Y 100. The buttons in the Y 200 and Y 300 positions are visible until after one or two hits, then the button that is in Y 300 position disappears, then after another hit or two the button that is in the Y 200 position disappears but the button that is in the Y 100 is still visible.

I cleared all my constraints to narrow it down to clear view of the constraints that is causing the problem. I do not think this Log Noise. Below is the error log:

load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1) 1 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:0x302aa7610 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 100 (active)>", "<NSLayoutConstraint:0x302acb480 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x302acb480 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (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:0x302aa7750 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 200 (active)>", "<NSLayoutConstraint:0x302acb5c0 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 100 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x302aa7750 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 200 (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:0x302aa7890 UIButton:0x10c257c00.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (active)>", "<NSLayoutConstraint:0x302acb700 UIButton:0x10c257c00.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 200 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x302aa7890 UIButton:0x10c257c00.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (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. 3 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:0x302aa7610 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 100 (active)>", "<NSLayoutConstraint:0x302acb480 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x302acb480 UIButton:0x10c257600.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 300 (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:0x302aa7750 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 200 (active)>", "<NSLayoutConstraint:0x302acb5c0 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 100 (active)>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x302aa7750 UIButton:0x10c257900.centerY == UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY + 200 (active)>

Problem could be that you have multiple constraints for UILayoutGuide:0x3030f0c40'UIViewSafeAreaLayoutGuide'.centerY (related to each button), creating inconsistency when you move buttons as the position of others have not yet changed.

Where (in which func) do you change the constraints ? Do you call viewWillNeedLayout after change ?

Could you post a minimal code example of the issue ?

Why do you constrain to UIViewSafeAreaLayoutGuide and not simply to safeArea center ?

PS: another solution would be to duplicate (or triplicate) the buttons and change their isHidden property as needed.

I do not call viewWillNeedLayout after change. I will provide a code snippet as soon as I can tonight. I constrain to the safearealayout guide because it’s can change depending on which layout you use….ie..iPhone 16max, iPhone 16 Pro, iPhone SE…etc.

Even when I use Auto Layout Constraints, my button behavior reacts the same.

class CSGView: UIView { var line0: UIBezierPath? var line1: UIBezierPath? var circleLayerLeft: CAShapeLayer? var circleLayerRight: CAShapeLayer? override func draw(_ rect: CGRect) { line0?.stroke() line1?.stroke() }

}

private func addConstraints() { let CSChoicesYpos = Int.random(in: 1...3) if CSChoicesYpos == 1 { CSGCardChoicesY1 = 100 CSGCardChoicesY2 = 200 CSGCardChoicesY3 = 300 } if CSChoicesYpos == 2 { CSGCardChoicesY1 = 200 CSGCardChoicesY2 = 300 CSGCardChoicesY3 = 100 } if CSChoicesYpos == 3 { CSGCardChoicesY1 = 300 CSGCardChoicesY2 = 100 CSGCardChoicesY3 = 200 } let CSgraphicuserinterface = CSGView() let CSChoiceACard = CSGView() let CSChoiceBCard = CSGView() let CSChoiceCCard = CSGView() CSgraphicuserinterface.translatesAutoresizingMaskIntoConstraints = false CSgraphicuserinterface.addSubview(CSChoiceACard) CSgraphicuserinterface.addSubview(CSChoiceBCard) CSgraphicuserinterface.addSubview(CSChoiceCCard) CSgraphicuserinterface.addSubview(CSCorrectButton) CSgraphicuserinterface.addSubview(CSInCorrectButton1) CSgraphicuserinterface.addSubview(CSInCorrectButton2) constraints.append(CSgraphicuserinterface.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor)) constraints.append(CSgraphicuserinterface.heightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.heightAnchor)) constraints.append(CSgraphicuserinterface.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor)) constraints.append(CSgraphicuserinterface.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor)) constraints.append(CSChoiceACard.widthAnchor.constraint(equalToConstant: 180)) constraints.append(CSChoiceACard.heightAnchor.constraint(equalToConstant: 79)) constraints.append(CSChoiceACard.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSChoiceACard.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY1))) constraints.append(CSChoiceBCard.widthAnchor.constraint(equalToConstant: 180)) constraints.append(CSChoiceBCard.heightAnchor.constraint(equalToConstant: 79)) constraints.append(CSChoiceBCard.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSChoiceBCard.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY2))) constraints.append(CSChoiceCCard.widthAnchor.constraint(equalToConstant: 180)) constraints.append(CSChoiceCCard.heightAnchor.constraint(equalToConstant: 79)) constraints.append(CSChoiceCCard.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSChoiceCCard.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY3))) constraints.append(CSCorrectButton.widthAnchor.constraint(equalToConstant: 184)) constraints.append(CSCorrectButton.heightAnchor.constraint(equalToConstant: 83)) constraints.append(CSCorrectButton.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSCorrectButton.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY1))) constraints.append(CSInCorrectButton1.widthAnchor.constraint(equalToConstant: 184)) constraints.append(CSInCorrectButton1.heightAnchor.constraint(equalToConstant: 83)) constraints.append(CSInCorrectButton1.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSInCorrectButton1.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY2))) constraints.append(CSInCorrectButton2.widthAnchor.constraint(equalToConstant: 184)) constraints.append(CSInCorrectButton2.heightAnchor.constraint(equalToConstant: 83)) constraints.append(CSInCorrectButton2.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor, constant: CGFloat(CSGCardChoicesX))) constraints.append(CSInCorrectButton2.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor, constant: CGFloat(CSGCardChoicesY3)))

NSLayoutConstraint.activate(constraints)

The buttons have been tested using TopAnchor, BottomAnchor, LeadingAnchor, TrailingAnchor as well.

How can this be resolved - load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1)
 
 
Q