We have found a runtime crash using TipUIPopoverViewController
because Xcode didn't warn about its usage when using a deployment target of iOS 16, without a proper #if available
verification.
In Xcode Version 16.2 (16C5032a), using swift code, TipUIPopoverViewController
can be used without if #available(iOS 17, *)
without even trigger a warning or compiler error.
This is the snippet we're using in a UIViewController
, and it compiles without a warning.
@objc
private func myMethod() {
if presentedViewController is TipUIPopoverViewController {
// do something
}
}
Of course this triggers a runtime error, specifically, a EXC_BAD_ACCESS
.
I was expecting that the same way Xcode warns us when we're using Tips
and Tips.Status
with iOS 16, this would also trigger a compilation error.