How do you use deprecation annotations?

Hi everyone! I’ve been thinking about how we can improve on the way deprecation works in Swift. I wanted to reach out to the larger Swift community to get your thoughts on how you use deprecation to help with guiding ideas for these improvements. Specifically, I was wondering:

  1. What does a deprecated API signal in your framework / package?
  2. What do you do with that deprecated API in future versions of your framework / package?

Thank you all in advance for your thoughts, and I look forward to hearing from you!


That the API is slated to be removed.

I remove it.


@available(iOS, introduced: 13.0, deprecated: 100000.0, renamed: "navigationTitle(_:)")

Why deprecated: 100000.0? It's deprecated but the compiler doesn't show deprecation warning. It's hard remove all deprecated calls if you don't know already and had to eye ball these calls. It's been this way since SwIFTUI 2, now SwiftUI 3 still that same way. Why cannot make removing deprecation easy?

Solution to see SwiftUI deprecation warnings: Don't see any deprecation warning, due to "deprecated: 100000.0"? What's the rationale for marking it this way?! - #6 by Fritzt

Terms of Service

Privacy Policy

Cookie Policy