𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Mastering iOS 14 Programming: Build professional-grade iOS 14 applications with Swift 5.3 and Xcode 12.4

✍ Scribed by Mario Eguiluz Alebicto; Chris Barker; Donny Wals


Publisher
Packt Publishing Ltd
Year
2021
Tongue
English
Leaves
559
Edition
4
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Become a professional iOS developer with the most in-depth and advanced guide to Swift 5.3, Xcode 12.4, ARKit 4, Core ML, and iOS 14’s new features

Key Features

  • Explore the world of iOS app development through practical examples
  • Understand core iOS programming concepts such as Core Data, networking, and the Combine framework
  • Extend your iOS apps by adding augmented reality and machine learning capabilities, widgets, App Clips, Dark Mode, and animations

Book Description

Mastering iOS 14 development isn’t a straightforward task, but this book can help you do just that. With the help of Swift 5.3, you’ll not only learn how to program for iOS 14 but also be able to write efficient, readable, and maintainable Swift code that reflects industry best practices.

This updated fourth edition of the iOS 14 book will help you to build apps and get to grips with real-world app development flow. You’ll find detailed background information and practical examples that will help you get hands-on with using iOS 14's new features. The book also contains examples that highlight the language changes in Swift 5.3. As you advance through the chapters, you'll see how to apply Dark Mode to your app, understand lists and tables, and use animations effectively. You’ll then create your code using generics, protocols, and extensions and focus on using Core Data, before progressing to perform network calls and update your storage and UI with the help of sample projects. Toward the end, you'll make your apps smarter using machine learning, streamline the flow of your code with the Combine framework, and amaze users by using Vision framework and ARKit 4.0 features.

By the end of this iOS development book, you’ll be able to build apps that harness advanced techniques and make the best use of iOS 14’s features.

What you will learn

  • Build a professional iOS application using Xcode 12.4 and Swift 5.3
  • Create impressive new widgets for your apps with iOS 14
  • Extend the audience of your app by creating an App Clip
  • Improve the flow of your code with the Combine framework
  • Enhance your app by using Core Location
  • Integrate Core Data to persist information in your app
  • Train and use machine learning models with Core ML
  • Create engaging augmented reality experiences with ARKit 4 and the Vision framework

Who this book is for

This book is for developers with some experience in iOS programming who want to enhance their application development skills by unlocking the full potential of the latest iOS version with Swift.

✦ Table of Contents


Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Chapter 1: What's New in iOS 14?
Technical requirements
Introducing App Clips
App Clip user journey
App Clips invocation methods
App Clips guidelines
Introducing WidgetKit
Widgets options
Widget guidelines
Improvements in augmented reality
Improvements in machine learning
Core ML Model Deployment, collections, and targeted deployments
Model encryption
Improvements in user privacy
Introducing Swift 5.2
Key path expressions as functions
Callable values of user-defined nominal types
Subscripts can now declare default arguments
Lazy filtering order is now reversed
New and improved diagnostics
Introducing Swift 5.3
Multi-pattern catch clauses
Multiple trailing closures
Synthesized comparable conformance for enum types
Increase availability of implicit self in escaping closures when reference cycles are unlikely to occur
Type-based program entry points – @main
Use where clauses on contextually generic declarations
Enum cases as protocol witnesses
Refine didSet semantics
Float16
Summary
Further reading
Chapter 2: Working with Dark Mode
Technical requirements
What is Dark Mode?
Understanding why we would need Dark Mode
Core developer concepts of Dark Mode
Dark mode from inside Xcode
Working with views in Dark Mode
What are adaptive colors?
What are semantic colors?
Using the programmatic approach
Working with the asset catalog for Dark Mode
Using custom adaptive colors
Using custom adaptive images
Further exploring Dark Mode
Using Dark Mode with SwiftUI
Programatically handling changes with trait collection
Specifying an appearance for views, ViewControllers, and windows
Accessibility in Dark Mode
Summary
Further reading
Chapter 3: Using Lists and Tables
Technical requirements
Working with UITableView
Setting up the project
Fetching contacts data
Prepping UITableView to display our contacts
Understanding protocols and delegation
Conforming to the UITableView protocols
Understanding the custom UITableViewCell override and the reuse identifier
Exploring UITableView further
Further understanding reuse identifiers
Prefetching in table views
Cell selection in table views
Working with UICollectionView
Setting up our collection view
Implementing layout with UICollectionViewDelegateFlowLayout
Exploring UICollectionView further
Implementing a custom UICollectionViewLayout
Cell selection in collection views
Working with lists in SwiftUI
Creating our first SwiftUI project
Building a list in SwiftUI
The equivalent to creating a custom cell in SwiftUI
Summary
Further reading
Chapter 4: Creating a Detail Page
Technical requirements
Implementing navigation with segues
Creating our new details view
Implementing and understanding segues
Creating a manual segue
Creating our layouts with UIStackView
Containing labels in a stack view
Passing data between view controllers
Updating the data loading
Passing the model to the details page
Updating our outlets
Best practices – creating a view model
Summary
Further reading
Chapter 5: Immersing Your Users withAnimation
Technical requirements
Using UIView.animate and UIViewPropertyAnimator
Creating our first animation
Working with multiple animations
Refactoring with UIViewPropertyAnimator
Understanding and controlling animation progress
Interactions with a pan gesture recognizer
Adding vibrancy to animations
Adding dynamism with UIKit Dynamics
Customizing view controller transitions
Implementing a custom modal presentation transition
Summary
Chapter 6: Understanding the Swift Type System
Technical requirements
Understanding available types in Swift
Working with reference types
Working with value types
Understanding structs
Understanding enums
Understanding differences in types
Comparing value types to reference types
Differences in usage
Deciding which type to use
When should I use a reference type?
When to use a value type
Summary
Chapter 7: Flexible Code with Protocols, Generics, and Extensions
Technical requirements
Understanding and implementing protocols
Defining your own protocols
Checking for traits instead of types
Extending your protocols with default behavior
Improving your protocols with associated types
Adding flexibility with generics
Summary
Chapter 8: Adding Core Data to Your App
Technical requirements
Understanding the Core Data stack
Adding Core Data to an existing application
Creating a Core Data model
Creating the models
Defining relationships
Using your entities
Persisting data and reacting to data changes
Understanding data persistence
Persisting your models
Refactoring the persistence code
Reading data with a simple fetch request
Filtering data with predicates
Reacting to database changes
Understanding the use of multiple instances of NSManagedObjectContext
Refactoring the persisting code
Summary
Further reading
Chapter 9: Fetching and Displaying Data from the Network
Technical requirements
Fetching data from the web with URLSession
Understanding the basics of URLSession
Working with JSON in Swift
Updating Core Data objects with fetched data
Implementing the fetch logic
Updating a movie with a popularity rating
Visualizing multiple threads
Summary
Chapter 10: Making Smarter Apps with Core ML
Technical requirements
Understanding machine learning and Core ML
Understanding what machine learning is
Understanding Core ML
Combining Core ML and computer vision
Understanding the Vision framework
Implementing an image classifier
Training your own models with Create ML
Training a Natural Language model
Training a Vision model
Updating models remotely with Model Deployment
Using the Core ML API to retrieve collections of models
Preparing and deploying the model
Encrypting Core ML models
Summary
Chapter 11: Adding Media to Your App
Technical requirements
Playing audio and video
Creating a simple video player
Creating an audio player
Playing media in the background
Recording video and taking pictures
Taking and storing a picture
Recording and storing video
Manipulating photos with Core Image
Summary
Chapter 12: Improving Apps with Location Services
Technical requirements
Requesting a user's location
Asking for permission to access location data
Obtaining a user's location
Subscribing to location changes
Setting up geofences
Summary
Chapter 13: Working with the Combine Framework
Technical requirements
Understanding the Combine framework
Understanding Publisher
Understanding Subscriber
Understanding Operators
Understanding Subject
Combining Publishers, Subscribers, and Operators
Using Operators to build error-proof streams
Summary
Chapter 14: Creating an App Clip for Your App
Technical requirements
Introducing App Clips
App Clip User Journey
App Clips Invocation Methods
Developing your first App Clip
Creating the App Clip's Target
Sharing resources and code with the App Clip
Using Active Compilation Conditions
Configuring, linking, and triggering your App Clip
Testing your App Clip Experiences
Summary
Chapter 15: Recognition with Vision Framework
Technical requirements
Introduction to the Vision framework
Recognizing text in images
Region of interest
Recognizing hand landmarks in real time
Understanding hand landmarks
Implementing hand detection
Summary
Chapter 16: Creating Your First Widget
Technical requirements
Introducing widgets and WidgetKit
Widget options
Widget guidelines
Developing your first widget
Creating a widget extension
Implementing multiple-size widgets
Providing the widget with data and configuration
Refreshing the widget's data
Summary
Chapter 17: Using Augmented Reality
Understanding ARKit
Understanding how ARKit renders content
Understanding how ARKit tracks the physical environment
Using ARKit Quick Look
Implementing the ARKit Quick Look view controller
Exploring SpriteKit
Creating a SpriteKit scene
Exploring SceneKit
Creating a basic SceneKit scene
Implementing an Augmented Reality gallery
Adding image tracking
Preparing images for tracking
Building the image tracking experience
Placing your own content in 3D space
Summary
Chapter 18: Creating a macOS app with Catalyst
Technical requirements
Discovering Mac Catalyst
Exploring new Mac Catalyst features
Building your first Mac Catalyst app
Exploring the iPad app
Scaling your iPad app for Mac
Optimizing your iPad app for Mac
Summary
Chapter 19: Ensuring App Quality with Tests
Testing logic with XCTest
Understanding what it means to test code
Setting up a test suite with XCTest
Optimizing code for testability
Introducing the question loader
Mocking API responses
Using models for consistency
Gaining insights through code coverage
Testing the user interface with XCUITest
Making your app accessible to your tests
Recording UI tests
Passing launch arguments to your app
Making sure the UI updates as expected
Summary
Chapter 20: Submitting Your App to the App Store
Adding your application to App Store Connect
Packaging and uploading your app for beta testing
Preparing your app for launch
Summary
Why subscribe?
About Packt
Other Books You May Enjoy
Packt is searching for authors like you
Leave a review - let other readers know what you think
Index


πŸ“œ SIMILAR VOLUMES


Mastering iOS 14 Programming: Build prof
✍ Mario Eguiluz Alebicto, Chris Barker, Donny Wals πŸ“‚ Library πŸ“… 2021 πŸ› Packt Publishing 🌐 English

<p><span>Become a professional iOS developer with the most in-depth and advanced guide to Swift 5.3, Xcode 12.4, ARKit 4, Core ML, and iOS 14's new features</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore the world of iOS app development through practical examples</span></spa

Mastering iOS 11 Programming: Build prof
✍ Wals, Donny πŸ“‚ Library πŸ“… 2017 πŸ› Packt Publishing 🌐 English

Transition to a Professional iOS developer with the most in-depth and advanced level guide on Swift 4 and Xcode 9 About This Book Filled with practical examples, this comprehensive guide explores all aspects of iOS Development. Learn powerful techniques and industry`s best practices to become pro iO

iOS 14 Programming Fundamentals with Swi
✍ Matt Neuburg πŸ“‚ Library πŸ“… 2020 πŸ› O'Reilly Media 🌐 English

Move into iOS development by getting a firm grasp of its fundamentals, including the Xcode 12 IDE, Cocoa Touch, and the latest version of Apple’s acclaimed programming language, Swift 5.3. With this thoroughly updated guide, you’ll learn the Swift language, understand Apple’s Xcode development tools

iOS 14 Programming Fundamentals with Swi
✍ Matt Neuburg πŸ“‚ Library πŸ› O'Reilly Media 🌐 English

<p><span>Move into iOS development by getting a firm grasp of its fundamentals, including the Xcode 12 IDE, Cocoa Touch, and the latest version of AppleÒ??s acclaimed programming language, Swift 5.3. With this thoroughly updated guide, youÒ??ll learn the Swift language, understand AppleÒ??s Xcode