Similar problem here, using Xcode 26 beta 4 and a physical device with iOS 16.4
public override func buildMenu(with builder: any UIMenuBuilder) {
if #available(iOS 17.0, *) {
builder.remove(menu: .autoFill)
}
super.buildMenu(with: builder)
}
If i comment the line 3, the error dissapears.
So I guess there is a problem with the #available(iOS 17.0, *), maybe it is being ignored or it's deprecated. (this code was working without problems when using Xcode 16.3)
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: