Preface

The iOS development environment has significantly matured, and with Apple users spending more money in the App Store, there are plenty of development opportunities for professional iOS developers. However, the journey to mastering iOS development and the new features of iOS 14 are not straightforward. This book will help you make that transition smoothly and easily. With the help of Swift 5.3, you'll not only learn how to program for iOS 14, but also how to write efficient, readable, and maintainable Swift code that maintains industry best practices.

Mastering iOS 14 Programming will help you build real-world applications and reflect the real-world development flow. You will also find a mix of thorough background information and practical examples, teaching you how to start implementing your newly gained knowledge.

By the end of this book, you will have gotten to grips with building iOS applications that harness advanced techniques and make the best use of the latest and greatest features available in iOS 14.

Who this book is for

If you're a developer with some experience of iOS programming and want to enhance your skills by unlocking the full potential of the latest iOS version with Swift to build great applications, this book is for you. This book assumes you are somewhat familiar with Swift and iOS development

What this book covers

Chapter 1, What's New in iOS 14, explores the latest APIs just released along with some of the current cutting-edge features available in iOS and the new changes in Swift 5.

Chapter 2, Working with Dark Mode, teaches you how a few easy steps from the start can make all the difference when implementing Dark Mode into either your new or existing iOS app.

Chapter 3, Using Lists and Tables, gets you to grips with how to handle Lists and Tables in iOS – while also explaining the finer details behind what makes them work.

Chapter 4, Creating a Detail Page, takes everything we've learned so far a step further by building out a specific details page for data taken from our Lists and Tables.

Chapter 5, Immersing Your Users with Animation, takes a look, with the foundation of our app set up, at what UIKit has to offer in terms of animation in Swift and iOS.

Chapter 6, Understanding the Swift Type System, allows you to get to grips with the theory behind the Swift type system, which plays a massive part in Swift programming languages.

Chapter 7, Flexible Code with Protocols, Generics, and Extensions, allows you to take the structure of an application that little bit further, learning core principles of software development in Swift.

Chapter 8, Adding Core Data to Your App, introduces Apple's CoreData framework as a way to include a database for user data in your app.

Chapter 9, Fetching and Displaying Data from the Network, shows how to make use of web APIs to fetch and display data.

Chapter 10, Making Smarter Apps with CoreML, explains what machine learning is, how it works, how you can use trained machine learning models in your apps, how you can use Apple's Vision framework to analyze images, and you'll see how it integrates with CoreML for powerful image detection. Lastly, you'll learn how to use the new CreateML tool to train your own models.

Chapter 11, Adding Media to Your App, covers playing back audio and video, taking photos, and extracting depth data from photos when available.

Chapter 12, Improving Apps with Location Services, shows several ways that apps can implement location tracking to enhance and improve a user's experience.

Chapter 13, Working with the Combine Framework, covers the Combine framework, allowing you to learn and understand the fundamentals of event-driven programming, including why and how we'd use it in our day-to-day applications.

Chapter 14, Creating an App Clip for Your App, focuses on creating a new App Clip for an existing app, understanding the restrictions, design guidelines, and options available for it.

Chapter 15, Recognition with Vision Framework, explains the Vision framework and how to recognize text in images and hand landmarks in video streams with iOS 14.

Chapter 16, Creating Your First Widget, focuses on creating a new Widget for an existing app, understanding the different options, sizes, and functionality that can bring to users.

Chapter 17, Using Augmented Reality, introduces ARKit and all its available features, including how to use 3D models and Scene Kit in order to build an augmented reality world for your app.

Chapter 18, Creating a macOS App with Catalyst, teaches Mac Catalyst, a way to develop iPadOS apps to run as native macOS apps. It takes an example project and turns it into a fully functioning macOS app that can be distributed to the Mac App Store.

Chapter 19, Ensuring App Quality with Tests, shows you how to set up tests for iOS applications.

Chapter 20, Submitting Your App to the App Store, demonstrates how to distribute apps to beta testers through TestFlight and how to submit an app for review in order to publish it to the App Store.

To get the most out of this book

All sample code in this book was written in Swift 5.3, at the time of writing Swift 5.4 is the latest release and the book is compatible with the new release, with Xcode 12.4 on a Mac running macOS Big Sur. To follow along with all the examples in this book, you must have at least Xcode 12.4 installed on your machine. It is recommended that you also have at least macOS Big Sur installed on your Mac because not all code samples are compatible with older versions of macOS.

This book assumes that you are somewhat familiar with Swift and iOS development. If you have no experience with Swift at all, it is recommended that you skim through Apple's Swift manual and go over the basics of iOS development. You don't have to be an expert on iOS development yet, but a solid foundation won't hurt you since the pacing of the book is aimed at somewhat experienced developers.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Mastering-iOS-14-Programming-4th-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781838822842_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Go ahead and open the project named CryptoWidget_start from the code bundle of this chapter."

A block of code is set as follows:

func doSomething(completionHandler: (Int) -> Void) {

     // perform some actions

     var result = theResultOfSomeAction

     completionHandler(result)

}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

func doSomething(completionHandler: (Int) -> Void) {

     // perform some actions

     var result = theResultOfSomeAction

     completionHandler(result)

}

Any command-line input or output is written as follows:

$ mkdir css

$ cd css

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "In the project named CryptoWidget_start, go to File | New | Target | Widget Extension."

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.244.216