Presentation

Welcompe the world of iOS development

iOS development consists of developing applications that can target mainly the iPhone and iPad but also macOS, iWatch and Apple TV. There are many ways to achieve this:

  • Using the official frameworks and tools provided by Apple
  • Using 3rd party frameworks and tools such as Capacitor, MAUI and Flutter

This training focuses on iOS development using the official tools and frameworks proposed by Apple. Our development stack will consist of the following items:

  • Programming language: Swift
  • UI Framework: SwiftUI
  • IDEs: Xcode and Swift Playgrounds

In addition to that, It is also possible to leverage the Swift language (without SwiftUI) in order to develop console apps and servers on Window, Linux, macOS.

History

The early days of iOS development used the Objective-C language, the UIKit UI Framework and -the good old- Xcode. This ecosystem was basic but quite powerful and allowed to develop amazing apps. The continuous updates from Apple improved the developer experience. For example, memory management became automatic (thanks to ARC) and the layout system became capable of adapting to different screen sizes.

In WWDC 2014, Apple announced the Swift language as an Open Source modern replacement to Objective-C. Following that, apple announced during the next WWDC SwiftUI as the replacement for UIKit.

swiftui
swiftui

As of 2021, the majority of new iOS projects use Swift and SwiftUI with UIKit as a fallback for the UI aspects.

Getting started

xcodes
xcodes

Create a CLI app with swift CLI

  • Open a terminal in an empty folder mkdir MyCLI and then cd MyCLI
  • Create the project with swift package init --name MyCLI --type executable
  • and run it with swift run. It should print -> Hello world

Create an App using Xcode or Swift playgrounds

  • On Xcode, create a either a Project or Playground and run it.
xcode-new-project.png
xcode-new-project.png

Swift project managers

In this training, we'll use swiftpm and Xcode.