iOS 17 Programming for Beginners - Eighth Edition
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
Embark on an exciting iOS app development journey with Swift 5.9, Xcode 15, and iOS 17. This hands-on guide equips you with the skills to create captivating apps and thrive in the competitive App Store landscape. Purchase of the print or Kindle book includes a free eBook in PDF format.
Key Features
- Dive into the latest iOS 17 features and Swift 5.9 through hands-on projects
- Develop robust apps with top design patterns used by professionals
- Expand your app's reach by effortlessly converting it for iPad, Mac, and visionOS
Book Description
In a world with nearly 2 million apps on the App Store, the demand for skilled iOS developers has never been higher. "iOS 17 Programming for Beginners, Eighth Edition" is your gateway to this lucrative and dynamic field. This hands-on guide is tailored for those who are new to iOS and takes you on a journey from learning the Swift language to crafting your own app and seeing it thrive on the App Store.
Our approach is hands-on and practical. Each chapter is designed to be a stepping stone in your development journey, providing step-by-step tutorials, real-life examples, and clear explanations of complex concepts. As you progress, you'll not only be skilled in Swift but also incorporate cutting-edge technologies into your apps. You'll learn how to publish your creations and harness the power of iOS 17 through a straightforward and easy to program example app divided into manageable parts.
By the time you've completed this book, you'll possess the skills and knowledge to not only develop and publish captivating apps but also leverage online resources to continually enhance your app development prowess.
What you will learn
- Discover the world of Xcode 15 and Swift 5.9, laying the foundation for your iOS development journey
- Implement the latest iOS 17 features through a hands-on example app, ensuring your apps remain innovative and engaging
- Build and deploy iOS apps using industry-standard design patterns and best practices.
- Implement the Model-View-Controller (MVC) design pattern to create robust and organized applications
- Expand your app's reach by effortlessly converting it for iPad, Mac, and visionOS
- Dive into UIKit, the essential framework for large-scale iOS projects
Who this book is for
This book is tailored for individuals with minimal coding experience who are new to the world of Swift and iOS app development. A basic understanding of programming concepts is recommended.
Show and hide more
Table of contents Product information
Table of contents
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Get in touch
- Technical requirements
- Downloading and installing Xcode from the App Store
- Exploring the Xcode user interface
- Running your app in Simulator
- Understanding the Devices and Build sections
- Trusting the Developer App certificate on your iOS device
- Technical requirements
- Introducing Swift playgrounds
- Customizing fonts and colors
- Running playground code
- Representing integers
- Representing floating-point numbers
- Representing strings
- Representing Booleans
- Using common data types in the playground
- Using type annotation to specify a type
- Using type safety to check values
- Using arithmetic operators
- Using compound assignment operators
- Using comparison operators
- Using logical operators
- Performing string operations
- Technical requirements
- Introducing conditionals
- Using if statements
- Using switch statements
- Technical requirements
- Exploring range operators
- Exploring loops
- The for-in loop
- The while loop
- The repeat-while loop
- Technical requirements
- Exploring arrays
- Creating an array
- Checking the number of elements in an array
- Adding a new element to an array
- Accessing an array element
- Assigning a new value to a specified index
- Removing an element from an array
- Iterating over an array
- Creating a dictionary
- Checking the number of elements in a dictionary
- Adding a new element to a dictionary
- Accessing a dictionary element
- Assigning a new value to an existing key
- Removing an element from a dictionary
- Iterating over a dictionary
- Creating a set
- Checking the number of elements in a set
- Adding a new element to a set
- Checking whether a set contains an element
- Removing an item from a set
- Iterating over a set
- Performing set operations
- Understanding set membership and equality
- Technical requirements
- Exploring functions
- Creating a function
- Using custom argument labels
- Using nested functions
- Using functions as return types
- Using functions as parameters
- Using a guard statement to exit a function early
- Simplifying closures
- Technical requirements
- Understanding classes
- Creating a class declaration
- Making an instance of the class
- Making a subclass
- Overriding a superclass method
- Creating a structure declaration
- Making an instance of the structure
- Comparing value types and reference types
- Deciding between classes and structures
- Creating an enumeration
- Technical requirements
- Exploring protocols
- Creating a protocol declaration
- Adopting a protocol via an extension
- Creating an array of different types of objects
- Technical requirements
- Understanding Swift concurrency
- Examining an app without concurrency
- Updating the app using async/await
- Improving efficiency using async-let
- Summary
- Technical requirements
- Learning useful terms in iOS development
- A tour of the JRNL app
- Using the Journal List screen
- Using the Add New Journal Entry screen
- Using the Journal Entry Detail screen
- Using the Map screen
- Setting the tab bar button titles and icons
- Embedding view controllers in navigation controllers
- Configuring Interface Builder
- Technical requirements
- Adding a table view to the Journal List screen
- Connecting storyboard elements to the view controller
- Configuring data source methods for the table view
- Setting the delegate and data source properties of the table view
- Adopting the UITableViewDataSource and UITableViewDelegate protocols
- Adding a bar button to the navigation bar
- Adding a new view controller scene
- Adding Cancel and Save buttons to the navigation bar
- Technical requirements
- Implementing the Journal Entry Detail screen
- Implementing the Map screen
- Summary
- Technical requirements
- Modifying the Journal List screen
- Adding an image view to journalCell
- Adding labels to journalCell
- Adding a custom view to the New Entry scene
- Adding a switch to the New Entry scene
- Adding a text field and a text view to the New Entry scene
- Adding an image view to the New Entry scene
- Embedding user interface elements in a stack view
- Configuring the number and size of static table view cells
- Adding user interface elements to static table view cells
- Technical requirements
- Understanding the Model-View-Controller design pattern
- Exploring view controllers
- Conforming to the UITableViewDataSource protocol
- Conforming to the UITableViewDelegate protocol
- Creating a TableViewExampleController instance
- Technical requirements
- Understanding model objects
- Creating a class to represent a journal entry
- Creating sample data
- Displaying data in a table view
- Creating a custom UITableViewCell subclass
- Connecting the outlets in journalCell
- Updating the data source methods in JournalListViewController
- Technical requirements
- Passing data from the Add New Journal Entry screen to the Journal List screen
- Creating the AddJournalEntryViewController class
- Connecting the UI elements to the AddJournalEntryViewController class
- Creating a JournalEntry instance from user input
- Updating the table view with a new journal entry
- Creating the JournalEntryDetailViewController class
- Connecting the UI elements to the JournalEntryDetailViewController class
- Displaying the details of a journal entry
- Displaying the details of a selected journal entry
- Technical requirements
- Getting your device location using the Core Location framework
- Modifying the AddJournalEntryViewController class
- Modifying the Info.plist file
- Creating the MapViewController class
- Configuring a pin to display a callout
- Going from the Map screen to the Journal Entry Detail screen
- Technical requirements
- Creating a singleton
- Modifying the JournalEntry class to be JSON-compatible
- Loading and saving JSON data
- Summary
- Technical requirements
- Creating a custom UIStackView subclass
- Adding your custom view to the Add New Journal Entry screen
- Adding your custom view to the Journal Entry Detail screen
- Summary
- Technical requirements
- Creating a new UIImagePickerController instance
- Implementing UIImagePickerControllerDelegate methods
- Getting permission to use the camera or photo library
- Summary
- Technical requirements
- Implementing a search bar for the Journal List screen
- Modifying table view data source methods
- Modifying the prepare(for:sender:) method
- Modifying the method to remove journal entries
- Summary
- Technical requirements
- Understanding collection views
- Modifying the Journal List screen to use a collection view
- Replacing the table view with a collection view
- Adding user interface elements to the collection view cell
- Modifying the JournalListTableViewCell class
- Modifying the JournalListViewController class
- Understanding size classes
- Modifying the JournalListViewController class
- Technical requirements
- Introducing SwiftData
- Modifying the JournalEntry class
- Implementing SwiftData components
- Modifying the JournalListViewController class
- Summary
- Technical requirements
- Creating a SwiftUI Xcode project
- Creating the Journal List screen
- Adding model objects and configuring navigation
- Using MapKit for SwiftUI
- Completing the Journal Entry Detail screen
- Summary
- Technical requirements
- Introducing widgets
- Adding a widget target to your app
- Providing timeline entries to your widget
- Customizing your widget’s view
- Adding a widget to your Home and Lock screens
- Summary
- Technical requirements
- Introducing visionOS
- Adding a visionOS target to your project
- Improving your app’s appearance in visionOS
- Adding 3D objects to your app
- Summary
- Technical requirements
- Getting an Apple Developer account
- Exploring your Apple Developer account
- Generating a certificate signing request
- Creating development and distribution certificates
- Registering an App ID
- Registering your devices
- Creating provisioning profiles
- Creating icons for your app
- Creating screenshots for your app
- Creating an App Store listing
- Creating an archive build
- Completing the information in App Store Connect
- Testing your app internally
- Testing your app externally
Show and hide more
Product information
- Title: iOS 17 Programming for Beginners - Eighth Edition
- Author(s): Ahmad Sahar
- Release date: October 2023
- Publisher(s): Packt Publishing
- ISBN: 9781837630561