Mastering iOS 14 Programming
eBook - ePub

Mastering iOS 14 Programming

Build professional-grade iOS 14 applications with Swift 5.3 and Xcode 12.4, 4th Edition

  1. 558 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering iOS 14 Programming

Build professional-grade iOS 14 applications with Swift 5.3 and Xcode 12.4, 4th Edition

Book details
Book preview
Table of contents
Citations

About This Book

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.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Mastering iOS 14 Programming by Mario Eguiluz Alebicto, Chris Barker, Donny Wals in PDF and/or ePUB format, as well as other popular books in Informatica & Programmazione di dispositivi mobili. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781838822606

Chapter 1: What's New in iOS 14?

During WWDC 2020, Apple introduced the new features and improvements included in iOS 14. Using the latest features in your apps can make a huge difference for users in terms of engagement, positive reviews, and overall user experience. It can also lead to other benefits, such as being featured by Apple in the App Store, and having an advantage over competitors' apps in the same category.
Apple made Swift 5.2 available for developers on March 24, 2020. Later in the year, Apple released Swift 5.3. These versions focus on quality and performance improvements, new language features, and increased support for Windows platforms and Linux distributions.
There was another big announcement during WWDC 2020: Apple Silicon. Apple introduced its own processors to the world. Developers can start building apps and ship them by the end of 2020, starting a transition that will last two years. This transition will establish a common architecture across all Apple products. With a common architecture, it will be easier to create apps for the entire Apple ecosystem.
In this chapter, you will learn the basics of two of the most significant new features on iOS 14: App Clips and widgets. We will also cover the latest additions to augmented reality, machine learning, and user privacy. At the end of the chapter, you will learn about the new additions to the Swift language with some code examples.
In this chapter, we're going to cover the following main topics of iOS 14, Swift 5.2, and Swift 5.3:
  • Introducing App Clips
  • Introducing WidgetKit
  • Improvements in augmented reality
  • Improvements in machine learning
  • Improvements in user privacy
  • Introducing Swift 5.2
  • Introducing Swift 5.3

Technical requirements

The code for this chapter can be found here: https://github.com/PacktPublishing/Mastering-iOS-14-Programming-4th-Edition/tree/master/Chapter%201%20-%20Whats%20New.
If you want to try out Swift 5.2 features as you read through the chapter, you need to install Xcode version 11.4 or later: https://itunes.apple.com/app/xcode/id497799835.

Introducing App Clips

App Clips allow users to discover your app in a fast and lightweight manner. With App Clips, a user can quickly use a feature of your app even without having the app installed on their phone. Let's see an example of what an App Clip looks like:
Figure 1.1 − App Clip UI
Figure 1.1 − App Clip UI
App Clips should be lightweight, brief, and finish a user task in seconds. Let's see some use cases of App Clips:
  • An App Clip to order coffee when you pass by the coffee shop door and tap on an NFC tag.
  • An App Clip to rent an electric bike parked in the street, just by scanning a QR code on it. Also, you can use Sign in with Apple and Apple Pay to avoid forms and interface complexities, allowing you to rent the bike in seconds.
  • An App Clip to pre-order from the menu in a restaurant and save time while you wait to be seated.
  • An App Clip that triggers when you tap around NFC spots in an art gallery or a museum and displays augmented reality scenes on your iPhone.
As you can see, the possibilities with App Clips are endless. Now that we have covered what an App Clip is, we are going to explain the user's journey using an App Clip (from the invocation to the end). We will cover the invocation methods (how to trigger an App Clip to appear). Finally, we will explore the recommended guidelines when building an App Clip.

App Clip user journey

Let's now explore the whole process and steps in more detail, starting from when the user discovers your App Clip to when the user finishes the App Clip journey.
Let's imagine that we have an app to rent electric bikes on the street. There are several stages involved in the App Clip process:
Figure 1.2 − App Clip process and steps
Figure 1.2 − App Clip process and steps
The steps of an AppClip are as follows:
  1. Invocation method: The App Clip invocation method is how the user can trigger and open an App Clip. For our example with the electric bike rental, a user scans a QR code placed in the bike with their device camera, and the App Clip opens on the home screen. The invocation method, in this case, is the QR code. We will explore more of them later in the chapter.
  2. User Journey: After the invocation, the App Clip presents some options for the user to choose from (for example, 1-hour rental for $2 and 24-hou...

Table of contents

  1. Mastering iOS 14 Programming
  2. Fourth Edition
  3. Preface
  4. Chapter 1: What's New in iOS 14?
  5. Chapter 2: Working with Dark Mode
  6. Chapter 3: Using Lists and Tables
  7. Chapter 4: Creating a Detail Page
  8. Chapter 5: Immersing Your Users with Animation
  9. Chapter 6: Understanding the Swift Type System
  10. Chapter 7: Flexible Code with Protocols, Generics, and Extensions
  11. Chapter 8: Adding Core Data to Your App
  12. Chapter 9: Fetching and Displaying Data from the Network
  13. Chapter 10: Making Smarter Apps with Core ML
  14. Chapter 11: Adding Media to Your App
  15. Chapter 12: Improving Apps with Location Services
  16. Chapter 13: Working with the Combine Framework
  17. Chapter 14: Creating an App Clip for Your App
  18. Chapter 15: Recognition with Vision Framework
  19. Chapter 16: Creating Your First Widget
  20. Chapter 17: Using Augmented Reality
  21. Chapter 18: Creating a macOS app with Catalyst
  22. Chapter 19: Ensuring App Quality with Tests
  23. Chapter 20: Submitting Your App to the App Store
  24. Other Books You May Enjoy