# \#deprecation

**URL:** https://forums.swift.org/tag/deprecation/87.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Detect all uses of declarations that are deprecated in any version of Swift or its platforms](https://forums.swift.org/t/detect-all-uses-of-declarations-that-are-deprecated-in-any-version-of-swift-or-its-platforms/83127)

<div class="topic-metadata">

**Author:** [@XDR](https://forums.swift.org/u/XDR)\
**Replies:** 0\
**Last updated:** [November 10, 2025, 8:23pm UTC](https://forums.swift.org/t/detect-all-uses-of-declarations-that-are-deprecated-in-any-version-of-swift-or-its-platforms/83127 "2025-11-10T20:23:30Z")

</div>

How can I detect all uses of declarations that are deprecated in any version of Swift or its platforms? e.g., my SwiftPM project uses Swift 6.0 and requires macOS 10.15 or newer. When I locally updated it to require ma…

---

## [Deprecating a function with a similar overload](https://forums.swift.org/t/deprecating-a-function-with-a-similar-overload/77715)

<div class="topic-metadata">

**Author:** [@CrownedPhoenix](https://forums.swift.org/u/CrownedPhoenix)\
**Replies:** 3\
**Last updated:** [February 10, 2025, 4:45pm UTC](https://forums.swift.org/t/deprecating-a-function-with-a-similar-overload/77715 "2025-02-10T16:45:42Z")

</div>

I made a mistake in a published API that I want to deprecate. It looks a bit like this (the generic aspect of these may not be important to the example - but the functions in question are generic in this way): func foo\<…

---

## [Suppressing deprecated warnings](https://forums.swift.org/t/suppressing-deprecated-warnings/53970)

<div class="topic-metadata">

**Author:** [@tera](https://forums.swift.org/u/tera)\
**Replies:** 10\
**Last updated:** [May 24, 2023, 10:33pm UTC](https://forums.swift.org/t/suppressing-deprecated-warnings/53970 "2023-05-24T22:33:03Z")

</div>

Is there swift equivalent of: #pragma GCC diagnostic ignored "-Wdeprecated-declarations"

---

## [How do you use deprecation annotations?](https://forums.swift.org/t/how-do-you-use-deprecation-annotations/53279)

<div class="topic-metadata">

**Author:** [@slazarus](https://forums.swift.org/u/slazarus)\
**Replies:** 2\
**Last updated:** [November 4, 2021, 11:43pm UTC](https://forums.swift.org/t/how-do-you-use-deprecation-annotations/53279 "2021-11-04T23:43:23Z")

</div>

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 ide…

---

## [Is there a way to deprecate public APIs for library clients only?](https://forums.swift.org/t/is-there-a-way-to-deprecate-public-apis-for-library-clients-only/52369)

<div class="topic-metadata">

**Author:** [@Karl](https://forums.swift.org/u/Karl)\
**Replies:** 3\
**Last updated:** [September 27, 2021, 12:29am UTC](https://forums.swift.org/t/is-there-a-way-to-deprecate-public-apis-for-library-clients-only/52369 "2021-09-27T00:29:59Z")

</div>

So, I have a library, which includes a public API for percent-encoding. The library comes with a bunch of "encode sets" (sets of characters which should be percent-encoded) as defined in the URL standard, and it is possi…

---

## [OSAtomicIncrement32 is missing deprecation warning](https://forums.swift.org/t/osatomicincrement32-is-missing-deprecation-warning/39996)

<div class="topic-metadata">

**Author:** [@tera](https://forums.swift.org/u/tera)\
**Replies:** 6\
**Last updated:** [September 3, 2020, 6:54pm UTC](https://forums.swift.org/t/osatomicincrement32-is-missing-deprecation-warning/39996 "2020-09-03T18:54:35Z")

</div>

i can not see a deprecation warning for OSAtomicIncrement32 during compilation despite of this in the header: @available (iOS, deprecated: 10.0, message: "Use atomic\_fetch\_add\_explicit(memory\_order\_relaxed) from \<stdato…

---

## [How do you properly deprecate a method in a Protocol?](https://forums.swift.org/t/how-do-you-properly-deprecate-a-method-in-a-protocol/13347)

<div class="topic-metadata">

**Author:** [@Arthur](https://forums.swift.org/u/Arthur)\
**Replies:** 7\
**Last updated:** [June 8, 2018, 2:42pm UTC](https://forums.swift.org/t/how-do-you-properly-deprecate-a-method-in-a-protocol/13347 "2018-06-08T14:42:54Z")

</div>

Without using @objc @optional, is there a way to properly deprecate a function in a protocol? I cannot make use of the Objective-C runtime because I tend to have struct types conforming to this protocol. Trivialized exa…
