Errors with the minimum supported platform

I’m on chapter 6: Adding support for token. After opening Package.swift, Xcode take a few minutes to prepare the project and after that I get this errors. How can I solve?

Are you using the latest Xcode with the most recent version of the source files? I just cloned a fresh copy of the materials and after opening Package.swift it compiled without issue. You might also try closing Xcode, removing ~/Library/Developer/Xcode/DerivedData/WebService-* and then opening the project again.

I tried this and have the same errors. Where I can update this? I believe it’s a platforms issues, as the error suggests. I’m using Xcode 14, iOS 16, and Swift 5.6

Here’s my package for Vapor.

let package = Package(
    name: "vapor",
    platforms: [

Finally got it working. I needed to go into the files themselves and add the #available if… flags above the structs and/or methods. I also went to edit schemes and added my folder to the path in lieu of /Library/Xcode/DerivedData/WebService, which is where your project seems to run by default. I also switched the scheme from iOS to Mac. Not sure what that does.