iOS 16 Programming for Beginners: Kickstart your iOS app development journey with a hands-on guide to Swift 5.7 and Xcode 14, 7th Edition
- Length: 686 pages
- Edition: 7
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-11-18
- ISBN-10: 180323704X
- ISBN-13: 9781803237046
- Sales Rank: #277728 (See Top 100 Books)
Take your next step in iOS app development and work with Xcode 14 and iOS 16.
Purchase of the print or Kindle book includes a free eBook in PDF format.
Key Features
- Explore the latest features of Xcode 14 and the Swift 5.7 programming language in this updated seventh edition
- Start your iOS programming career and have fun building your own iOS apps
- Discover the new features of iOS 16 such as Mac Catalyst, SwiftUI, Lock Screen widgets and WeatherKit
Book Description
With almost 2 million apps on the App Store, iOS mobile apps continue to be incredibly popular. Anyone can reach millions of customers around the world by publishing their apps on the App Store, which means that competent iOS developers are in high demand.
iOS 16 Programming for Beginners, Seventh Edition, is a comprehensive introduction for those who are new to iOS, covering the entire process of learning the Swift language, writing your own app, and publishing it on the App Store.
This book follows a hands-on approach. With step-by-step tutorials to real-life examples and easy-to-understand explanations of complicated topics, each chapter will help you learn and practice the Swift language to build your apps and introduce exciting new technologies to incorporate into your apps. You’ll learn how to publish iOS apps and work with new iOS 16 features such as Mac Catalyst, SwiftUI, Lock Screen widgets, WeatherKit, and much more.
By the end of this iOS development book, you’ll have the knowledge and skills to write and publish interesting apps, and more importantly, to use the online resources available to enhance your app development journey.
What you will learn
- Get to grips with the fundamentals of Xcode 14 and Swift 5.7, 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 16 features such as SwiftUI, Lock screen widgets, and WeatherKit
- Convert an existing iPad app into a Mac app with Mac Catalyst
- 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. Basic knowledge of programming, including loops, data types, and so on, is necessary.
iOS 16 Programming for Beginners, Seventh Edition: Kickstart your mobile app development journey by building iOS apps with Swift 5.5 and Xcode 13 1 Getting Familiar with Xcode Join our book community on Discord Technical requirements Downloading and installing Xcode from the App Store Understanding the Xcode user interface Running the app in the iOS simulator Understanding the No Devices and Build sections Using an iOS device for development Trusting the Developer App certificate on your iOS device Connecting an iOS device wirelessly Summary 2 Simple Values and Types Join our book community on Discord Technical requirements Understanding Swift playgrounds Customizing fonts and colors Running playground code Exploring data types Representing integers Representing floating-point numbers Representing Booleans Representing strings Using common data types in the playground Exploring constants and variables Understanding type inference and type safety Using type annotation to specify a type Using type safety to check values Exploring operators Using arithmetic operators Using compound assignment operators Using comparison operators Using logical operators Performing string operations Using the print() statement Summary 3 Conditionals and Optionals Join our book community on Discord Technical requirements Introducing conditionals Using if statements Using switch statements Introducing optionals and optional binding Summary 4 Range Operators and Loops Join our book community on Discord Technical requirements Exploring Range operators Exploring Loops Using the for-in loop Using the while loop The repeat-while loop Summary 5 Collection Types Join our book community on Discord Technical requirements Understanding 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 particular index Removing an element from an array Iterating over an array Understanding dictionaries 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 Understanding sets 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 Exploring Set operations Exploring set membership and equality Summary 6 Functions and Closures Join our book community on Discord Technical requirements Understanding 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 Understanding closures Simplifying closures Summary 7 Classes, Structures, and Enumerations Join our book community on Discord Technical requirements Understanding classes Creating a class declaration Making an instance of the class Making a subclass Overriding a superclass method Understanding structures Creating a structure declaration Making an instance of the structure Comparing value types and reference types Deciding between classes and structures Understanding enumerations Creating an enumeration Summary 8 Protocols, Extensions, and Error Handling Join our book community on Discord Technical requirements Understanding protocols Creating a protocol declaration Understanding extensions Adopting a protocol via an extension Creating an array of different types of objects Exploring error handling Summary 9 Swift Concurrency Join our book community on Discord Technical requirements Understanding Swift Concurrency Examining an app without concurrency Updating the app using async/await Improving efficiency using async-let Summary 10 Setting Up the User Interface Join our book community on Discord Technical requirements Learning useful terms in iOS development Touring the Let's Eat app Using the Explore screen Using the Locations screen Using the Restaurant List screen Using the Restaurant Detail screen Using the Review Form screen Using the Photo Filter screen Using the Map screen Creating a new Xcode project Setting up a tab bar controller scene Setting the titles of the tab bar's buttons Embedding view controllers in navigation controllers Adding the Assets.xcassets file Adding the icons for the Explore and Map buttons Setting up the Launch screen Configuring the Launch screen's background color Adding a logo and constraints to the Launch screen Configuring Interface Builder Summary 11 Building Your User Interface Join our book community on Discord Technical requirements Adding a collection view to the Explore screen Connecting storyboard elements to outlets in a view controller Adding a Cocoa Touch Class file to your project Connecting storyboard elements to the view controller Configuring data source methods for the collection view Setting the delegate and data source properties of the collection view Adopting the UICollectionViewDataSource and UICollectionViewDelegate protocols Adding a section header to the collection view Configuring storyboard element sizes Presenting a view modally Adding a button to the collection view header Adding a new view controller scene Adding Cancel and Done buttons to the navigation bar Summary 12 Finishing Up Your User Interface Join our book community on Discord Technical requirements Adding a table view to the Locations screen Implementing the Restaurant List screen Declaring the RestaurantListViewController class Adopting the delegate and data source protocols Presenting the Restaurant List screen Implementing the Restaurant Detail screen Implementing the Review Form screen Implementing the Map screen Summary 13 Modifying and Configuring Cells Join our book community on Discord Technical requirements Modifying the Explore screen section header Adding Auto Layout to the Explore screen's section header Modifying the exploreCell collection view cell Modifying the restaurantCell collection view cell Adding Auto Layout constraints to the restaurantCell collection view cell Configuring the locationCell table view cell Summary 14 Getting Started with MVC and Collection Views Join our book community on Discord Technical requirements Understanding the Model-View-Controller design pattern Exploring controllers and classes Understanding collection views Revisiting the Explore and Restaurant List screens Summary 15 Getting Data into Collection Views Join our book community on Discord Technical requirements Understanding model objects Understanding .plist files Creating a structure to represent a cuisine Implementing a data manager class to read data from a .plist file Using the data manager to initialize ExploreItem instances Displaying data in a collection view Connecting the outlets in exploreCell Implementing additional data manager methods Updating the data source methods in ExploreViewController Summary 16 Getting Started with Table Views Join our book community on Discord Technical requirements Understanding table views Creating the LocationViewController class Connecting the table view to the LocationViewController class Adding the data source and delegate methods Adding location data for the table view Creating the LocationDataManager class Displaying data in a table view Summary 17 Getting Started with MapKit Join our book community on Discord Technical requirements Understanding and creating annotations Creating the RestaurantItem class Creating the MapDataManager class Creating the DataManager protocol Refactoring the MapDataManager class Refactoring the ExploreDataManager class Adding annotations to a map view Creating the MapViewController class Connecting the outlets for the map view Setting the map view region to be displayed Displaying MKAnnotationView instances on the map view Creating custom MKAnnotationView instances Going from the Map screen to the Restaurant Detail screen Creating and configuring a storyboard reference Performing the showDetail segue Passing data to the Restaurant Detail screen Organizing your code Refactoring the ExploreViewController class Using the // MARK: syntax Refactoring the RestaurantListViewController class Refactoring the LocationViewController class Refactoring the MapViewController class Summary 18 Getting Started with JSON Files Join our book community on Discord Technical requirements Getting data from JSON files Understanding the JSON format Creating the RestaurantDataManager class Using data from JSON files in your app Configuring the MapDataManager instance to use data from the RestaurantDataManager instance Storing a user-selected location Adding a UICollectionReusableView subclass for the section header in the Explore screen Connecting the section header's label to the ExploreViewController class Adding an unwind action method to the Done button Selecting only one location in the Locations screen Passing location and cuisine information to the RestaurantListViewController instance Creating a view controller for the cells on the Restaurant List screen Connecting the outlets for the RestaurantCell class Displaying a custom UIView to indicate no data is available Displaying a list of restaurants on the Restaurant List screen Summary 19 Displaying Data in a Static Table View Join our book community on Discord Technical requirements Setting up outlets for the RestaurantDetailViewController class Displaying data in the static table view Passing data to the RestaurantDetailViewController instance Summary 20 Getting Started with Custom UIControls Join our book community on Discord Technical requirements Creating a custom UIControl subclass Displaying stars in your custom UIControl subclass Adding support for touch events Implementing an unwind method for the Cancel button Creating the ReviewFormViewController class Summary 21 Getting Started with Cameras and Photo Libraries Join our book community on Discord Technical requirements Understanding filters Creating model objects for the Photo Filter screen Creating the ImageFiltering protocol Creating classes for the Photo Filter screen Creating a class for the collection view cells Creating a view controller for the Photo Filter screen Getting permission to use the camera or photo library Summary 22 Understanding Core Data Join our book community on Discord Technical requirements Introducing Core Data Implementing Core Data components for your app Creating a data model Creating ReviewItem Creating RestaurantPhotoItem Creating a Core Data manager Understanding how saving and loading works Updating the ReviewFormViewController class to save reviews Passing RestaurantID to the ReviewFormViewController instance Updating the PhotoFilterViewController class to save photos Displaying saved reviews and photos on the Restaurant Detail screen Calculating a restaurant's overall rating Summary 23 Getting Started with Mac Catalyst Join our book community on Discord Technical requirements Fixing user interface issues Making your app run on all iOS devices Identifying device type Understanding size classes Updating the Explore screen Updating the Restaurant List screen Updating the app to work on macOS Summary 24 Getting Started with SwiftUI Join our book community on Discord Technical requirements Creating a SwiftUI Xcode project Creating the Restaurant List screen Adding model objects and configuring navigation Using UIKit and SwiftUI Views together Completing the Restaurant Detail screen Summary 25 Getting Started with Lock Screen Widgets Join our book community on Discord 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 Lock screen Summary 26 Getting Started with WeatherKit Join our book community on Discord Technical requirements Understanding WeatherKit Preparing your app to use WeatherKit Creating the WeatherDataManager class Displaying Weather data on the Restaurant Detail screen Summary 27 Testing and Submitting Your App to the App Store Join our book community on Discord 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 Submitting your app to the App Store 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 Testing your app internally Testing your app externally Summary
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: iOS 16 Programming for Beginners: Kickstart your iOS app development journey with a hands-on guide to Swift 5.7 and Xcode 14, 7th Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.