iOS 14 Programming for Beginners
eBook - ePub

iOS 14 Programming for Beginners

Get started with building iOS apps with Swift 5.3 and Xcode 12, 5th Edition

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

iOS 14 Programming for Beginners

Get started with building iOS apps with Swift 5.3 and Xcode 12, 5th Edition

About this book

Publisher's note: This edition from 2020 is outdated and does not make use of the most recent iOS and swift features. A new sixth edition, updated for iOS 15 and including new advanced topics, such as Mac Catalyst, SwiftUI, Swift Concurrency, and SharePlay, has now been published

Key Features

  • Explore the latest features of Xcode 12 and the Swift 5.3 programming language in this updated fifth edition
  • Kick-start your iOS programming career and have fun building your own iOS apps
  • Discover the new features of iOS 14 such as Mac Catalyst, SwiftUI, widgets and App Clips

Book Description

If you're looking to work and experiment with powerful iOS 14 features such as widgets and App Clips to create your own apps, this iOS programming guide is for you. The book offers a comprehensive introduction for experienced programmers who are new to iOS, taking you through the entire process of learning the Swift language, writing your own apps, and publishing them on the App Store.

Fully updated to cover the new iOS 14 features, along with Xcode 12 and Swift 5.3, this fifth edition of iOS 14 Programming for Beginners starts with an introduction to the Swift programming language and shows you how to accomplish common programming tasks with it. You'll then start building the user interface (UI) of a complete real-world app using the storyboards feature in the latest version of Xcode and implement the code for views, view controllers, data managers, and other aspects of mobile apps. The book will also help you apply iOS 14 features to existing apps and introduce you to SwiftUI, a new way to build apps for all Apple devices. Finally, you'll set up testers for your app and understand what you need to do to publish your app on the App Store.

By the end of this book, you'll not only be well versed in writing and publishing applications, but you'll also be able to apply your iOS development skills to enhance existing apps.

What you will learn

  • Get to grips with the fundamentals of Xcode 12 and Swift 5.3, the building blocks of iOS development
  • Understand how to prototype an app using storyboards
  • Discover the Model-View-Controller design pattern and how to implement the desired functionality within an app
  • Implement the latest iOS features, such as widgets and App Clips
  • Convert an existing iPad app into an Apple Silicon Mac app
  • Design, deploy, and test your iOS applications with design patterns and best practices

Who this book is for

This book is for anyone who has programming experience but is new to Swift and iOS app development. Experienced programmers looking to explore the latest iOS 14 features will also find this book useful.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
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.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
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 use the Perlego app on both iOS or Android devices to read anytime, anywhere โ€” even offline. Perfect for commutes or when youโ€™re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access iOS 14 Programming for Beginners by Ahmad Sahar in PDF and/or ePUB format, as well as other popular books in Computer Science & Operating Systems. We have over one million books available in our catalogue for you to explore.

Information

Section 1: Swift

Welcome to the first part of this book. In this part, you will begin by exploring Xcode, Apple's programming environment, which is also known as an Integrated Development Environment (IDE). After that, you will start learning the foundations of Swift 5, the programming language used to write iOS apps, and see how it is used to accomplish common programming tasks.
This part comprises the following chapters:
  • Chapter 1, Getting Familiar with Xcode
  • Chapter 2, Simple Values and Types
  • Chapter 3, Conditionals and Optionals
  • Chapter 4, Range Operators and Loops
  • Chapter 5, Collection Types
  • Chapter 6, Functions and Closures
  • Chapter 7, Classes, Structures, and Enumerations
  • Chapter 8, Protocols, Extensions, and Error Handling
By the end of this part, you'll understand the process of creating an app and running it on a simulator or device, and you'll have a working knowledge of how to use the Swift programming language to accomplish common programming tasks. This will prepare you for the next part, and will also enable you to create your own Swift programs. Let's get started!

Chapter 1: Getting Familiar with Xcode

Welcome to iOS 14 Programming for Beginners. I hope you will find this a useful introduction to writing and publishing iOS 14 apps on the App Store.
In this chapter, you'll learn how to download and install Xcode on your Mac. You'll familiarize yourself with the different parts of the Xcode user interface, and you'll create your first iOS app and run it in the iOS simulator. You will then learn how to connect an iOS device to Xcode via USB so that you can run the app on it, how to add an Apple ID to Xcode so that the necessary digital certificates can be created and installed on your device, and how to trust the certificate on your device. Finally, you will learn how to connect to your device over Wi-Fi, so you no longer need to plug and unplug your device every time you want to run an app.
By the end of this chapter, you will know how to create and run apps on the iOS simulator or a device, which you will need to do when you build your own apps.
The following topics will be covered:
  • Downloading and installing Xcode from the App Store
  • Understanding the Xcode user interface
  • Running the app in the iOS simulator
  • Using an iOS device for development

Technical requirements

To perform the exercises for this chapter, you will need the following:
  • An Apple Mac computer running macOS 10.15 Catalina or macOS 11.0 Big Sur
  • An Apple ID (if you don't have one, you will create one in this chapter)
  • Optionally, an iOS device running iOS 14
The Xcode project for this chapter is located in the Chapter01 folder of the code bundle for this book, which can be downloaded here:
https://github.com/PacktPublishing/iOS-14-Programming-for-Beginner-Fifth-Edition
Check out the following video to see the Code in Action: https://bit.ly/3jvJ8hs
You'll start by downloading Xcode, Apple's integrated development environment for developing iOS apps, from the App Store in the next section.

Downloading and installing Xcode from the App Store

Before you begin writing iOS apps, you need to download and install Xcode from the App Store. Follow these steps:
  1. Choose App Store from the Apple menu.
  2. In the search field in the top-right corner, type Xcode and press the Return key.
  3. You should see Xcode in the search results. Click Get and click Install.
  4. If you have an Apple ID, type it in the Apple ID textbox. If you don't have an Apple ID, click the Create Apple ID button and follow the step-by-step instructions to create one:
    Figure 1.1 โ€“ Apple ID creation dialog box
    Figure 1.1 โ€“ Apple ID creation dialog box
    Important information
    You can see more information on how to create an Apple ID at this link: https://support.apple.com/en-us/HT204316#appstore
  5. Once Xcode has been installed, launch it. You should see the following ...

Table of contents

  1. iOS 14 Programming for Beginners Fifth Edition
  2. Why subscribe?
  3. Preface
  4. Section 1: Swift
  5. Chapter 1: Getting Familiar with Xcode
  6. Chapter 2: Simple Values and Types
  7. Chapter 3: Conditionals and Optionals
  8. Chapter 4: Range Operators and Loops
  9. Chapter 5: Collection Types
  10. Chapter 6: Functions and Closures
  11. Chapter 7: Classes, Structures, and Enumerations
  12. Chapter 8: Protocols, Extensions, and Error Handling
  13. Section 2:Design
  14. Chapter 9: Setting Up the User Interface
  15. Chapter 10: Building Your User Interface
  16. Chapter 11: Finishing Up Your User Interface
  17. Chapter 12: Modifying and Configuring Cells
  18. Section 3:Code
  19. Chapter 13: Getting Started with MVC and Collection Views
  20. Chapter 14: Getting Data into Collection Views
  21. Chapter 16: Getting Started with MapKit
  22. Chapter 17: Getting Started with JSON Files
  23. Chapter 18: Displaying Data in a Static Table View
  24. Chapter 19: Getting Started with Custom UIControls
  25. Chapter 20: Getting Started with Cameras and Photo Libraries
  26. Chapter 21: Understanding Core Data
  27. Section 4:Features
  28. Chapter 22: Getting Started with Apple Silicon Macs
  29. Chapter 23: Getting Started with SwiftUI
  30. Chapter 24: Getting Started with Widgets
  31. Chapter 25: Getting Started with App Clips
  32. Chapter 26: Testing and Submitting Your App to the App Store
  33. Other Books You May Enjoy