Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode to show all soft deprecations

Tags:

xcode

swiftui

I've noticed Apple is rolling out some soft deprecations, however, Xcode won't show them. I know that these won't affect the app, but I still want to see them and use the recommended methods. Anyway to force Xcode to show them? Like this one of ScrollView:

@available(iOS, introduced: 13.0, deprecated: 100000.0, message: "Use the ScrollView(_:content:) initializer and the scrollIndicators(:_) modifier")
@available(macOS, introduced: 10.15, deprecated: 100000.0, message: "Use the ScrollView(_:content:) initializer and the scrollIndicators(:_) modifier")
@available(tvOS, introduced: 13.0, deprecated: 100000.0, message: "Use the ScrollView(_:content:) initializer and the scrollIndicators(:_) modifier")
@available(watchOS, introduced: 6.0, deprecated: 100000.0, message: "Use the ScrollView(_:content:) initializer and the scrollIndicators(:_) modifier")
public init(_ axes: Axis.Set = .vertical, showsIndicators: Bool = true, @ViewBuilder content: () -> Content)
like image 226
Son Nguyen Avatar asked Dec 29 '25 22:12

Son Nguyen


1 Answers

You are not seeing them because your target OS is below the deprecation version.

No need to worry about those but if you really insist of seeing the warnings, set your target os to really high number from the build settings like:

Demo

⚠️ This is just to see the warnings, don't do this for production!


Update:

Depending on your Xcode version, this method might prevent the code from building. As a workaround, you can ignore the build errors and manually step through the code until the warnings begin to show up.

like image 54
Mojtaba Hosseini Avatar answered Dec 31 '25 17:12

Mojtaba Hosseini



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!