Going further
Server side development
- Vapor is a Swift framework that allows to develop servers
- Install the Vapor cli
brew install vapor
- Create a vapor project
vapor new hello-vapor -n
- Run the server: cd
hello-vapor
andswift run
Building for debugging...
Build complete! (1.25s)
[ NOTICE ] Server starting on http://127.0.0.1:8080
- Test the server
➜ curl http://127.0.0.1:8080
It works!
➜ curl http://127.0.0.1:8080/hello
Hello, world!
Swift and SwoftUI on the browser
- SwiftWasm is a project that allows to run Swift code in the browser using WebAssembly.
- SwiftWasm Pad is an online editor that allows to write SwiftUI code and run it in the browser. It relies on the TokamakUI framework which is SwiftUI-compatbile framework(or a re-implementation of SwiftUI) for the web.
- SwiftWebUI is another project that allows to run a server that renders SwiftUI to the browser. Note that it is considered as a toy project by its creator.
Advanced Swift
Conclusion
This training was introduction on Swift and SwiftUI. It just scratched the surface of developing for the Apple development. There are many things that we didn't explore such as the accessibility, hardware features such as geolocation and the technical aspects of the developer account (certificates, provisioning profiles, etc.).
To go further, it is advised to watch the videos from Apple's WWDC (WorldWide Developer Conference - pronounced "dubdub dee cee"). There many other resources available online that you should pick and choose depending on the needs. Here are some of them: