Mobile Application Development for iOS I

list Preamble

info Description

This course is a platform-specific, in-depth study of Apple’s open source Swift programming language, with the goal of learning how to develop applications for macos and ios, specifically iPhone, while learning core programming concepts and methodologies. Topics include collection types, control flow, functions, closures, enumerations, structures, classes, and error-handling. This course also teaches students how to create optimal digital-device user experiences (ux) through user interface (ui) design principles using color, layout, rhythm, balance, and typography. Prerequisite: None.

list Learning Outcomes

Upon successful completion of this course, students will be able to...

file_download Software Requirements

Apple Developer Account

Although an Apple Developer Account is not classified as “software”, you’ll need one in order to download certain software, and also to release any ios apps you create on the Apple Store. If you have an Apple id, then you can simply log in to the Apple Developer website. If you don’t, you can create one from the log in page.

Xcode (Mac only)

Xcode is the development environment we’ll use for ios development. It’s 7.8gb in size, as of January 2023. If you’re running the latest version of macos, then you may simply download the latest version of Xcode from its website or from the Apple Store.

If, however, you’re running an older version of macos, then the download process is more involved. You’ll need to locate the version of macos, locate the correct version of Xcode for your version of macos, and, finally, download the version of Xcode from the Apple Developer website.

  1. Locate the version of macOS on your machine. Click the apple icon in the top left corner of your screen, then choose “About This Mac”. Note the name and numeric version of macos.
  2. Locate the version of Xcode you’ll need. Launch the App Store, search for “xcode”, then click “Xcode Developer Tools”, not the download icon. Locate the text “Version History”. Click it, then look for your macos version. For example, if you were running Big Sur (11.3), you’d find that 12.5.1 is the correct version of Xcode for Big Sur.
  3. Download Xcode from the Apple Developer website. Log in to your Apple Developer account. Under Program resources, choose Additional resources → Software Downloads, then, in the top right corner, choose More. Now search for your version of Xcode. For example, I’d search for “xcode 12.5.1”. Note: Do not download any release candidates.

Text Editor (Mac, Windows, and Linux)

The code you write will require a text editor. Although there are many on the market, such as Sublime Text (nagware), for example, vs Code (open source) is the only editor supported in class. Download the Linux, Windows, or macOS version from https://code.visualstudio.com/.

We now need to install the official Swift extension for vs Code, created by The Swift Server Work Group.

  1. Launch Code
  2. Bring up the Extension pane by typing the following: COMMAND + SHIFT + X
  3. Search for sswg.swift-lang
  4. Click “Install”

Rectangle (Mac only)

Writing software requires working with multiple windows. Rectangle makes working in a multi-window environment much easier. Download it here.

GitHub (Mac, Windows, and Linux)

All in-class examples, assignments, and help will be done via GitHub. Download the client for your computer here if you don’t feel comfortable with The Terminal.

Fonts (Mac, Windows, and Linux)

In addition to the stock issue, monospace/fixed-width fonts included with your os, here are a few more fonts to explore in your text editors:

menu_book Textbooks

The textbooks for our course are free and authored by Apple Education Specialists. They are only available in electronic format, not in print. You can read, highlight, and annotate the textbooks via the Apple Books application on a macos or ios device.

The Swift Programming Language covers all the major aspects of the Swift programming language in the first half of the book, with examples designed to be compiled and run from your command line interface, or cli. We’ll cover about half of the Swift language from the book.

Develop in Swift: Explorations covers the basics of creating apps for the iPhone, using a simulator, paying special attention to the design process, while extending on the important programing concepts covered in The Swift Programming Language.

calendar_month Schedule

Important Notes

The University treats absences related to covid-19 as excused absences. Consequently, you’ll need to get notes from someone in class, as mentioned in the section of this syllabus marked Advice on Succeeding in Class. There will not be a streaming video option for anyone missing class.

Notable Dates

The weekly schedule for the semester, complete with topics and readings.
Week Class Topics Homework
1
Mon
Wed
  • Thorough syllabus breakdown
  • Introduction to software toolchain
  • Software installfest
  • Carefully re-read the syllabus to ensure you’re aware of all the requirements for the course.
  • If you don’t already have a GitHub account, open one before the next class.
2
Mon
  • Learn to use Apple’s Books app
  • Introduction to Swift
  • Declaring constants and variables; Type annotations
  • Naming/printing constants and variables
  • Comments; Semicolons

[Thumbnail — The Swift Programming Language] The Basics, pgs 55 – 62

Wed
  • Int, UInt, and floating-point numbers
  • Integer and floating-point conversions
  • Numeric literals and type conversions
  • Type safety and inference; Type aliases

[Thumbnail — The Swift Programming Language] The Basics, pgs 76 – 100

3
Mon
  • Booleans; Tuples; Optionals
  • Forced unwrapping; Implicitly unwrapped optionals
  • Optional bindings
  • Assertions and preconditions; Enforcing preconditions; Debugging with assertions

[Thumbnail — The Swift Programming Language] Basic Operators, pgs 103 – 115

Wed
  • Terminology
  • Assignment operator; Arithmetic operators; Remainder operator
  • Unary plus and minus operators
  • Compound assignment operators; Ternary operator

[Thumbnail — The Swift Programming Language] Basic Operators, pgs 115 – 127

4
Mon
  • Nil-coalescing operator
  • Range operators: Closed-range, half-open range, and one-sided range
  • Logical Operators; Combining logical operators

[Thumbnail — The Swift Programming Language] Strings and Characters, pgs 129 – 138

Wed
  • Multiline string literals; Special characters in string literals
  • Initializing empty string; Extended string delimiters
  • String mutability
  • Strings are value types

[Thumbnail — The Swift Programming Language] Basic Operators, pgs 138 – 164

5
Mon
  • Working with characters
  • Concatenating strings and characters; String Interpolation; Counting characters
  • Accessing and modifying a string; Inserting and Removing characters into strings
  • Substrings
  • Comparing strings: String and character equality; Prefix and suffix equality

[Thumbnail — The Swift Programming Language] Collection Types, pgs 172 – 207

Wed
  • Mutability of collections
  • Arrays
  • Sets
  • Dictionaries

[Thumbnail — The Swift Programming Language] Control Flow, pgs 208 – 257

6
Mon
  • For-in loops; While loops
  • Conditional statements (if); Switch; Fallthrough
  • Continue; Break
  • Labeled statements

[Thumbnail — The Swift Programming Language] Control Flow, pgs 258 – 264

[Thumbnail — The Swift Programming Language] Functions, pgs 265 – 279

Wed
  • Early exit
  • Checking API availability
  • Defining and calling functions
  • Function parameters and return values

[Thumbnail — The Swift Programming Language] Functions, pgs 279 – 298

7
Mon
  • Function argument labels and parameter names
  • Variadic and in-out parameters
  • Function types; Nested functions

[Thumbnail — The Swift Programming Language] Closures, pgs 300 – 308

Wed
  • Closure expressions
  • Inferring type from context
  • Implicit returns from single-expression closures
  • Operator methods

[Thumbnail — The Swift Programming Language] Closures, pgs 308 – 332

8
Mon
  • Trailing closures
  • Capturing values
  • Closures are reference types
  • Escaping closures; Autoclosures

[Thumbnail — The Swift Programming Language] Enumerations, pgs 336 – 353

Wed
  • Matching enumeration values with a switch statement
  • Iterating over enumeration cases
  • Associated values
  • Raw values: Implicitly assigned raw values; Initializing from a raw value
  • Recursive enumerations
None
9
Mon
Spring recess
None
Wed
Spring recess
None
10
Mon
  • Comparing structures and classes
  • Definition syntax
  • Structure and class instances
  • Accessing properties

[Thumbnail — The Swift Programming Language] Structures and Classes, pgs 354 – 361

Wed
  • Memberwise initializers for structure types
  • Structures and enumerations are value types
  • Classes are reference types
  • Identity operators

[Thumbnail — The Swift Programming Language] Structures and Classes, pgs 361 – 370

11
Mon
  • Stored properties; Stored Properties of constant structure instances
  • Lazy stored properties; Stored properties and instance variables
  • Computed Properties
  • Shorthand getter and setter declarations

[Thumbnail — The Swift Programming Language] Properties, pgs 371 – 384

Wed
  • Read-only computed properties
  • Property observers
  • Property wrappers
  • Global and local variables

[Thumbnail — The Swift Programming Language] Properties, pgs 385 – 409

12
Mon
  • Type properties; Type property syntax
  • Querying and setting type properties
  • Instance methods

[Thumbnail — The Swift Programming Language] Properties, pgs 409 – 418

[Thumbnail — The Swift Programming Language] Methods, pgs 419 – 422

Wed
  • The self property
  • Modifying value types from within instance methods
  • Assigning to self within a mutating method
  • Type methods

[Thumbnail — The Swift Programming Language] Methods, pgs 422 – 434

13
Mon
  • Create a new project
  • Build and run your app
  • The storyboard interface
  • Adding a frame
  • Adding/configuring an Image ViewCreate a new project
  • Build and run your app
  • The storyboard interface
  • Adding a frame
  • Adding/configuring an Image View

[Thumbnail — Develop in Swift: Explorations] Build a PhotoFrame App, pgs 48 – 71

[Thumbnail — Develop in Swift: Explorations] Build a QuestionBot App, pgs 138 – 150

Wed
  • Putting shapes on the screen
  • Adding physics
  • Handling taps
  • Callbacks

[Thumbnail — Develop in Swift: Explorations] Building Apps: Color Picker, pgs 301 – 345

14
Mon
  • Creating outlets
  • Creating actions
  • Multiple actions and outlets
  • Sliders
  • Buttons
  • Tinting switches and sliders

[Thumbnail — Develop in Swift: Explorations] Building Apps: ChatBot, pgs 346 – 367

Wed
  • Working with indexes
  • Adding storage

[Thumbnail — Develop in Swift: Explorations] Building Apps: Rock, Paper, Scissors, pgs 368 – 383

15
Mon
  • Working with the Model-View-Controller, or mvc, design pattern
  • Creating models
  • Building views
  • Building controllers

[Thumbnail — Develop in Swift: Explorations] Building Apps: MemeMaker, pgs 384 – 399

Wed
  • Segmented controls
  • Making connections
  • Modeling your data
  • Gesture recognizers
Work on final project
16
Mon
  • Final projects due
  • Last day of class
Enjoy your break!
Wed

assignment Assignments

The assignments portion of your final grade consists of three homework-type assignments and one final project. (See the Grading Formula section to learn what percentage of your final grade each is worth.)

  1. Assignment I
  2. Assignment II
  3. Assignment III
  4. Final project

Grading Formula

Your grade for this course will be computed using the following formula:

  1. Assignments (45%)
    • Assignment I — 15%
    • Assignment II — 15%
    • Assignment III — 15%
  2. Final project (45%)
  3. Participation (10%)

balance Class Policies

warning Academic Honesty

Cheating of any kind will not be tolerated in this course; make certain that all the work you submit is your own. Refresh your understanding of the college’s policy on academic honesty.

accessible Students with Disabilities

Read about how The University of Hartford supports students with disabilities: https://www.hartford.edu/academics/academic-support/accessibility-services/default.aspx

balance Title IX and Sexual Assault

Sexual violence and other forms of sexual misconduct and harassment, including stalking and intimate partner violence, are prohibited under Title ix, federal and state law, and University of Hartford policy. Information on the University’s policies against sexual violence can be found at https://www.hartford.edu/about/policies/title-ix/. Resources regarding sexual violence can be found at https://www.hartford.edu/about/policies/title-ix/on-off-campus-resources.aspx

Note: University of Hartford faculty, staff, and ras are required to report incidents of sexual misconduct to the Title ix Office (title9@hartford.edu). For further information on The University’s policies and resources, please contact Jason Martinez (860.768.5255; jamartine@hartford.edu) or Justin Bell (860.768.4880; jbell@hartford.edu).

psychology Mental Health and Well-Being

Mental Health is an important aspect of students’ well-being and integral to positive academic experiences and success. If, during the semester, you experience difficulties and would like support, consider contacting the University of Hartford’s caps, or Counseling and Psychological Services, which offers a range of short-term counseling services available to full-time undergraduate students at no additional cost, and to part-time undergraduate and graduate students for a small fee. caps is located in Gengras Student Union, Room 313 map, and can be reached by calling 860.768.4482 or emailing Liz Inkel at inkel@hartford.edu. Office hours are Monday – Friday, 8:30 AM – 4:30 PM.

info Advice on Succeeding in Class

Read over the following to understand procedures for maximizing your chances of succeeding in class.

door_front Office Hours

If neither of the aforementioned times agrees with your schedule, we can make alternate arrangements to meet.

contact_mail Contact

Nowadays, I only use email for emergency situations, such as a pet emergencies, personal tragedies, etc. For matters related to our course, you’re advised to see me before or after class, during my office hours, or by appointment. My contact info is listed in the Preamble.