Version First Edition
Platform iOS 15
Language Swift 5.5
Editor Xcode 13

This book will be your guide to turn ideas into robust applications that can scale.

This book is for iOS developers with a basic understanding of Swift, SwiftUI and Core Data, that want to learn how to create apps that follow the best standards.

Level up your skills by learning about:

  • App architecture: Discover how to organize your code using MVVM and feature grouping.
  • Building features: Learn how to structure your code to work on features that can be testable.
  • Create code that scale: Understand the principles to create code that’s robust using S.O.L.I.D. principles.
  • Async/await: Learn how the new modern concurrency model can help you write well-structured asynchronous code.
  • Accessibility and good-looking apps: Discover how you can create apps that look and feel good for all audiences.
  • Modularization: Learn how to create modular code that can be reused.
  • Privacy: Understand why privacy is important and the tools Apple provides so you can develop apps that respect users’ data.

After completing this book, you’ll be prepared to tackle any new or existing project and create code that’s testable and robust.

Before You Begin

This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.

i

iii

iv

Section I: Designing Real World Apps

For an app to be successful, it needs to be planned out. This means understanding the requirements, how they translate to code, and how to best structure your code to be flexible but powerful.

This section describes how up-front design helps drive your model and data layers, and how features in Swift and iOS help developers bring the design to life.

iOS is over a decade old, and continues to add new functionality year after year. This book will cover the best practices, frameworks and tools to help you create a successful iOS app.

1

Before you start building any features, you first must get acquainted with the domain of the app, devise a plan of attack and start building a strong foundation to support the app's features. You’ll learn about feature grouping, the many layers of the app and the domain of PetSave.

2

After getting to know the basic setup and structure of the app, the readers will learn about the other part of the Data layer, Networking. Here, readers will learn how the sample app connects to an external API and fetches data.

3

In this chapter, you'll learn about how you can persist data to a local database, and why this is vital for many modern mobile apps.

4

Section II: Building App Features

Using layers to logically organize your code is only part of the answer when it comes to structuring your app’s features. The user interface is the main connection between your user and your lower level layers, so it’s important to pick a proper architecture that you can easily keep up to date when you build your features.

In this section, you’ll go over the upper-level architecture for the app, while building out two new features. For this, you’ll use capabilities such as SwiftUI, Combine and async/await.

You'll start to build PetSave's first feature, Animals Near You. You'll learn about view models and how to organize your code and how to update the UI data changes. You'll also polish the UI so that users have a more pleasant list.

5

You'll build a search feature for PetSave app. You'll also learn how to reuse code between Animals Near You and the Search view.

6

Section III: Modularizing Your App

Don’t reinvent the wheel. Modules that others have built and provided to the community can save you time. You can also make your own modules to use later in your development or make them available to the community.

Modules (and the features they come from) have some costs though, one of which is navigating between features. In this section, you’ll explore how Xcode can help in not only the creation of, but the use of, modules in your app, and understand how features can be tied together with navigation.

This chapter will show the benefits of modularizing an app and how to do it by building the onboarding flow. This helps the reader understand the process of creating a new framework.

7

This chapter will walk down the lane of TabView, NavigationView and Navigation in general. How to perform navigation with it in detail.

8

Section IV: Enhancing the User Interface & Experience

A successful user experience can be the difference between a 1-star and 5-star app on the App Store. Lively and responsive user interfaces, interactive controls, customization, localization, and accessibility all contribute to whether a user will re-engage with your app after their first use.

In this section, you’ll enhance the user interface with animations and custom controls. Also, you’ll start to get your app ready for the broad set of users in the world by applying human interface guidelines and accessibility features.

In this chapter, you'll learn about how you can keep your user engaged with your app through the use of animations and custom controls.

9

In this chapter, you'll learn how accessibility is built into iOS frameworks, and how you can take advantage of it in your own apps.

10

In this chapter, you'll look at the various ways you can customize your app's look and feel to give it a unique appearance in the App Store.

11

Section V: App Privacy, Maintenance & Deployment

As you approach deployment more and more things come to mind: am I protecting that user’s data and privacy? Do I have any edge cases in my code that I haven’t seen? How do I get beta testers, and why won’t my Code Signing work? All these questions can be summarized into three topics: Privacy, Debugging and App Distribution.

In this section you’ll dive deeper into these topics, getting you ready to send your app to the App Store.

In this chapter, you'll learn about user privacy by requesting access to the user's location data. You'll also learn how Apple makes apps be more transparent about what kind of data they are collecting.

12

In this chapter, you'll learn about the vast topic of debugging. You'll come across the tools Xcode provides to facilitate that.

13

In this chapter, you'll learn how to create archives of your apps and how to submit them to the App Store. Also, you'll learn how to use TestFlight to beta test your app.

14

Meet the team

Contributors

Who is this book for

This book is for iOS developers with a basic understanding of Swift, SwiftUI and Core Data, that want to understand the end-to-end process of creating an app. From having an idea to publishing it into the App Store.

Concepts covered in this book

  • App architecture
  • Privacy
  • Accessibility
  • Async/await
  • Frameworks
  • Swift Package Manager
  • Modularization

Reviews

Version history

First Edition · iOS 15, Swift 5.5, Xcode 13

v1.0 · Apr 20 2022 · Aaqib Hussain, Josh Steele & Renan Benatti Dias
See book details
Pro

Real-World iOS by Tutorials

By Aaqib Hussain, Josh Steele and Renan Benatti Dias

The best book to teach how you create professional iOS apps, going over all the steps from conceiving the idea to distributing the app in the App Store.

Read for Free with the Pro subscription* * Includes this and all other books in our online library See all benefits
Buy Individually $59.99* *Includes access to all of our online reading features.
See buying options
Hide buying options

All videos. All books.
One low price.

A raywenderlich.com subscription is the best way to learn and master mobile development — plans start at just $19.99/month!

Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.