Open menu with table of contents iOS Development Introduction
Logo of Stuttgart Media University for light theme Logo of Stuttgart Media University for dark theme
Mobile Application Development 2

iOS Development Introduction

Stuttgart Media University

1 Agenda

  • iOS Overview
    • System Architecture, Runtime Environment
  • Development Tools
  • MacOS Basics
  • Git & Gitlab

2 iOS Overview - Facts

  • Formerly known as iPhone OS, introduced on 29th July 2007 with the Apple iPhone
  • Derived from Mac OS X, based on Darwin a free, Unix like OS
  • Kernel type: Hybrid
  • Supported platforms: ARM
  • Size: approx. 3 GB
  • Current version: 18.0
  • Current iOS devices: iPhone, iPod Touch, iPad (derivate iPadOS), Apple TV (derivate tvOS), Apple Watch (derivate watchOS)

3 iOS Architecture

center 70%

4 Application Runtime Environment

  • Applications run in a UNIX based environment and have full support for threads, sockets, etc. but differences to Mac OS X exist, e.g.:
  • Virtual Memory
    • Virtual Memory is constrained to physical available memory (no paging to disk)
    • Read-only pages are released when more memory is needed
    • No Garbage Collector
  • Multitasking (iOS > 4.0)
    • Apps in background are suspended
    • Apps can ask system for background execution

5 Application Runtime Environment

  • Security features
    • Application sandbox
      • iOS Apps are restricted to a unique location in the file system
    • File protection (iOS > 4.0)
      • Allows to encrypt files and make them inaccessible when the device is locked
    • Keychain
      • similar to Mac OS X keychain, allows to store passwords
      • Stored outside the application sandbox

6 Development Tools - XCode

  • Xcode: IDE including Debugger
    • IDE for Mac OS X and iOS
    • Sourcecode editor
    • Debugging in simulator and remote on device supported
    • Compiler: Apple LLVM Compiler
    • Current version: 16.0

center 80%

7 Development Tools - Simulator

  • Simulator (not an emulator)
  • Simulating the iOS devices using iOS libraries on Mac OS X
  • Simulates GPS, multitouch (pressing alt), shaking the device and orientation changes
  • Logs error messages to console

center 40%

8 Development Tools - Instruments

  • Instruments: tracing and profiling tool

center 60%

Source: Apple

9 Development Tools - Interface Builder

  • Interface Builder: tool for creating GUIs

center 60%

10 Development Tools - Storyboards

  • Storyboards: Interface Builder feature since Xcode 4.2, before using XIBs
  • Allows to specify screens and the triggers and transitions between them

center 60%

11 Development Tools - SwiftUI

12 MacOS Basics

  • MacOS is based on Darwin (like iOS)
  • Kernel type: Hybrid (like iOS)
  • Supported platforms: Intel, ARM

12.1 Important Tools

Finder

  • Show hidden files: Command + Shift + .
  • Show Library folder: Shift + Command + L

Spotlight

  • Search: Command + Space

Keyboard Settings

  • Focus on next window: Command + <

Keyboard tips

  • Backslash (\): Shift+Option+7
  • Pipe (|): Option+7
  • Brackets ([]): Option +5 for [, Option + 6 for ]
  • Curly braces ({}): Option + 8 for {, Option + 9 for }
  • Change keyboard (e.g. for smileys): fn
  • @ sign: Option+L
  • Copy: Command+c
  • Paste: Command+v
  • Undo: Command+z
  • Redo: Command+r
  • Select All: Command+a
  • Save: Command+s

XCode Tips

  • Re-Indent selection: Control+I
  • Use Folders for organizing files
  • Use Option + Click to open files in new tabs

Xcode terminology

  • Template: Project type
  • Workspace: Project
  • Target: Build configuration
    • All files for a specific build configuration (e.g. Debug, Release)
    • Destinations for building the app (e.g. iPhone, MacOS, Apple TV,Apple Vision)
  • Scheme: Build configuration + target

13 Git & Gitlab

  • Git: Version control system
  • Gitlab: Web-based Git repository manager

13.1 Important Git Commands

  • Clone repository: git clone <repository_url>
  • Push changes: git push
  • Pull changes: git pull
  • Commit changes: git commit -m "Commit message"
  • Add changes: git add <file>
  • Add changes for all files from root of repository: git add :/
  • Check status: git status
  • Check log: git log
  • Check remote url: git remote get-url origin
  • checkout branch: git checkout <branch_name>
  • create branch: git checkout -b <branch_name>
  • merge branch: git merge <branch_name>
  • delete branch: git branch -d <branch_name>

14 Recap Questions

  • iOS is based on which operation system?
  • What is the difference between an emulator and a simulator?
  • What is the instrument tool used for?
  • What is the purpose of the storyboard?
  • What is SwiftUI?