When I try to compiled my newly created vapor project with Xcode 9 I get 189 compile errors. What's the trick to making this work? I installed vapor and the toolbox, and create via 'vapor new test --template=api' and then 'vapor xcode' to start it up.
相关问题
- read/write local json file swift 4
- How to upload images from the browser to Amazon S3
- Xcode 9 simulator doesn't save userdefaults
- Bool.hashValue valid to convert to Int?
- Simultaneous accesses to 0x10f10df48, but modifica
相关文章
- Convert received Int to Bool decoding JSON using C
- Making NSDecimalNumber Codable
- Uploading files using Vapor
- Xcode 9 simulator remove frames
- Inheritance of Encodable Class
- Convert string JSON response to a boolean using Sw
- is it possible to turn off wifi or switch iPhone t
- Checking Http Status Swift4
Check that everything is up to date. The following builds and runs for me at this time:
Use latest vapor toolbox.
Currently:
Note,
Vapor Framework:__
only shows when the terminal working directorypwd
is pointing to a vapor project directory.If needed ...
In some cases the vapor toolbox may need to be deleted and reinstalled. (see "vapor toolbox broken after upgrading swift")
Use latest Xcode release.
Currently: Xcode: 9.1, Swift: 4.0.2
Use
vapor update
orswift package update
alternately,
The above updates, compiles and runs OK for me in Xcode 9.1.
Note: However, there are about 44 new deprecation warnings of the same type. I first became aware of the
characters
deprecation with Xcode9.1/Swift4.0.2.So, new deprecation warnings, but 0 errors ... and, more importantly, the project runs as Vapor 2 + Swift 4.
Also, check
Packages.resolved
versions versus what is available in each respective source repository. On github, the Vapor Examples Lab: TemplateApiTest repository contains thePackages.resolved
which was generated and works with the tool chain scenario above.Finally, double check that the target is
Run
on macOS and not an ARM-based iOS for this build.Try 'brew upgrade vapor', if using brew. If you're using apt, try "sudo apt-get update" and then "sudo apt-get install vapor". This worked for me. I think because I had installed 2.0 a while ago, which couldn't sink with 3.0 projects.