Since updating to Xcode 13.2 (13C90) my App crashes instantly when instantiating a CLLocationButton, but this only happens when running the App in the Simulator.
My setup code looks as follows:
let button = CLLocationButton() button.icon = .arrowOutline button.label = .none button.cornerRadius = Style.CornerRadius.double button.backgroundColor = .white button.tintColor = ColorCatalog.Colors.themeColor.color button.addTarget(self, action: #selector(userLocationButtonTapped), for: .touchUpInside) userLocationButton = button view.addSubview(userLocationButton) // setting up constraints for CLLocationButton to be on the top right corner button.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ button.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16.0), button.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16.0) ]) }
On Xcode 13.1, this works just fine. On Xcode 13.2 I get this exception when run in the Simulator:
In the console it prints:
2021-12-14 13:02:13.003747+0100 appname[9412:217536] *** Assertion failure in CGImageRef _Nonnull UISCreateImageFromDrawing(__strong id _Nonnull, CGFloat, UISDisplayRange)(), UISDrawing.m:19