It is a problem with the Swift Version
It looks like you didn't update your Swift.
In the Version Compatibility documentation, Apple notified the book is describing Swift 5.9.2.
Go to the App Store, and update your XCode to update the Swift version.
Topic:
Programming Languages
SubTopic:
Swift
Tags: