# 5.9.0 Released!

**URL:** <https://forums.swift.org/t/5-9-0-released/70416>\
**Category:** Alamofire\
**Created:** [March 4, 2024, 2:24am UTC](https://forums.swift.org/t/5-9-0-released/70416 "2024-03-04T02:24:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [March 4, 2024, 2:24am UTC](https://forums.swift.org/t/5-9-0-released/70416/1 "2024-03-04T02:24:43Z")

</div>

Released on 2024-03-03. All issues associated with this milestone can be found using this [filter](https://github.com/Alamofire/Alamofire/milestone/89?closed=1).

### Added

- [🔥 Experimental 🔥] `WebSocketRequest`, as a wrapper for `URLSessionWebSocketTask`. This preview release is undocumented behind `@_spi(WebSocket)`. Its API _will_ change in the future, especially to adopt typed throws, but it is largely feature complete, tested, and usable now. API feedback, missing use cases, and bug reports are much appreciated before it goes fully public.
  - Added by [Jon Shier](https://github.com/jshier) in Pull Request [#3455](https://github.com/Alamofire/Alamofire/pull/3455).

- `PrivacyInfo.xcprivacy` file and integration with SPM, CocoaPods, and Carthage.
  - Added by [Dmitry Kuleshov](https://github.com/kdvmgn) and [Jon Shier](https://github.com/jshier) in Pull Requests [#3792](https://github.com/Alamofire/Alamofire/pull/3792), [#3831](https://github.com/Alamofire/Alamofire/pull/3831), and [#3839](https://github.com/Alamofire/Alamofire/pull/3839).

- `AlamofireDynamic` target, to force dynamic linking in Xcode when using SPM. Only use when you know you need it.
  - Added by [Jon Shier](https://github.com/jshier) in Pull Request [#3808](https://github.com/Alamofire/Alamofire/pull/3808).

- `AFInfo` enum and a public `version` value to get Alamofire's current version, `AFInfo.version`.
  - Added by [Jon Shier](https://github.com/jshier) in Pull Request [#3819](https://github.com/Alamofire/Alamofire/pull/3819).

### Updated

- Alamofire to require Swift 5.7.1.
  - Updated by [Jon Shier](https://github.com/jshier) in Pull Request [#3798](https://github.com/Alamofire/Alamofire/pull/3798).

- Project structure to break apart large `Request.swift` file and consolidate various `Request` subclasses into their own files.
  - Updated by [Jon Shier](https://github.com/jshier) in Pull Request [#3798](https://github.com/Alamofire/Alamofire/pull/3798).

- `Empty` type to be `Sendable`.
  - Updated by [Antoine van der Lee](https://github.com/AvdLee) in Pull Request [#3816](https://github.com/Alamofire/Alamofire/pull/3816).

- `.swiftformat` to remove duplicate rules.
  - Updated by [Fourenn](https://github.com/giftbott) in Pull Request [#3835](https://github.com/Alamofire/Alamofire/pull/3835).

### Fixed

- Platform deprecation warnings in `Package.swift` in newer Xcode versions.
  - Updated by [fess](https://github.com/apps4everyone) in Pull Request [#3823](https://github.com/Alamofire/Alamofire/pull/3823).

- `Alamofire.podspec` after project restructuring.
  - Updated by [mlch](https://github.com/mlch911) in Pull Request [#3825](https://github.com/Alamofire/Alamofire/pull/3825).

- Various documentation typos.
  - Fixed by [JaewoongLee-swift](https://github.com/JaewoongLee-swift), [TaeHyun](https://github.com/kth1210), and [hugo-syn](https://github.com/hugo-syn) in various Pull Requests.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [March 4, 2024, 2:28am UTC](https://forums.swift.org/t/5-9-0-released/70416/2 "2024-03-04T02:28:55Z")

</div>

`WebSocketRequest` took so long because I started development while a nasty bug was present on Apple's OSes. I posted this in the original PR to detail the bug:

This feature was delayed so long due to the many hours of frustration I had to deal with when Apple shipped a message dropping bug in iOS 14.5 - 14.7. In trying to test the socket connections I would connect to the test server, have it reply with a message, and then close the connection. Shockingly that meant that _sometimes_ the messages wouldn't come through. But sometimes they would. Investigating other web socket clients and inspecting network traffic with Wireshark revealed that the messages were being sent by the server but the client just wasn't receiving them. Further investigation showed that delaying the close of the connection by 60ms or so let the client receive the message reliably. After many hours I finally had reliable tests! Only to then test on the iOS 15 betas and see that I didn't need the delay at all, the tests were reliable without it! Turns out it was just a bug in iOS 14.5 - 14.7. I was so disgusted by this fact that I gave up on the feature for years. I'll call out this bug in the documentation.
