ENGLISH

Mastering iOS 14 Programming: Build professional-grade iOS 14 applications with Swift 5.3 and Xcode 12.4

Book information

Publisher
Packt Publishing Ltd
Year
2021
ISBN
1838822607, 9781838822606
Language
english
Format
PDF
Filesize
15 MB (15282788 bytes)
Edition
4
Pages
558\559
Time added
2021-04-06 07:47:15

Description

Become a professional iOS developer with the most in-depth and advanced guide to Swift 5.3, Xcode 12.4, ARKit 4, Core ML, and iOS 14’s new features Key FeaturesExplore the world of iOS app development through practical examplesUnderstand core iOS programming concepts such as Core Data, networking, and the Combine frameworkExtend your iOS apps by adding augmented reality and machine learning capabilities, widgets, App Clips, Dark Mode, and animationsBook Description Mastering iOS 14 development isn’t a straightforward task, but this book can help you do just that. With the help of Swift 5.3, you’ll not only learn how to program for iOS 14 but also be able to write efficient, readable, and maintainable Swift code that reflects industry best practices. This updated fourth edition of the iOS 14 book will help you to build apps and get to grips with real-world app development flow. You’ll find detailed background information and practical examples that will help you get hands-on with using iOS 14's new features. The book also contains examples that highlight the language changes in Swift 5.3. As you advance through the chapters, you'll see how to apply Dark Mode to your app, understand lists and tables, and use animations effectively. You’ll then create your code using generics, protocols, and extensions and focus on using Core Data, before progressing to perform network calls and update your storage and UI with the help of sample projects. Toward the end, you'll make your apps smarter using machine learning, streamline the flow of your code with the Combine framework, and amaze users by using Vision framework and ARKit 4.0 features. By the end of this iOS development book, you’ll be able to build apps that harness advanced techniques and make the best use of iOS 14’s features. What you will learnBuild a professional iOS application using Xcode 12.4 and Swift 5.3Create impressive new widgets for your apps with iOS 14Extend the audience of your app by creating an App ClipImprove the flow of your code with the Combine frameworkEnhance your app by using Core LocationIntegrate Core Data to persist information in your appTrain and use machine learning models with Core MLCreate engaging augmented reality experiences with ARKit 4 and the Vision frameworkWho this book is for This book is for developers with some experience in iOS programming who want to enhance their application development skills by unlocking the full potential of the latest iOS version with Swift. Cover Title Page Copyright and Credits Contributors Table of Contents Preface Chapter 1: What's New in iOS 14? Technical requirements Introducing App Clips App Clip user journey App Clips invocation methods App Clips guidelines Introducing WidgetKit Widgets options Widget guidelines Improvements in augmented reality Improvements in machine learning Core ML Model Deployment, collections, and targeted deployments Model encryption Improvements in user privacy Introducing Swift 5.2 Key path expressions as functions Callable values of user-defined nominal types Subscripts can now declare default arguments Lazy filtering order is now reversed New and improved diagnostics Introducing Swift 5.3 Multi-pattern catch clauses Multiple trailing closures Synthesized comparable conformance for enum types Increase availability of implicit self in escaping closures when reference cycles are unlikely to occur Type-based program entry points – @main Use where clauses on contextually generic declarations Enum cases as protocol witnesses Refine didSet semantics Float16 Summary Further reading Chapter 2: Working with Dark Mode Technical requirements What is Dark Mode? Understanding why we would need Dark Mode Core developer concepts of Dark Mode Dark mode from inside Xcode Working with views in Dark Mode What are adaptive colors? What are semantic colors? Using the programmatic approach Working with the asset catalog for Dark Mode Using custom adaptive colors Using custom adaptive images Further exploring Dark Mode Using Dark Mode with SwiftUI Programatically handling changes with trait collection Specifying an appearance for views, ViewControllers, and windows Accessibility in Dark Mode Summary Further reading Chapter 3: Using Lists and Tables Technical requirements Working with UITableView Setting up the project Fetching contacts data Prepping UITableView to display our contacts Understanding protocols and delegation Conforming to the UITableView protocols Understanding the custom UITableViewCell override and the reuse identifier Exploring UITableView further Further understanding reuse identifiers Prefetching in table views Cell selection in table views Working with UICollectionView Setting up our collection view Implementing layout with UICollectionViewDelegateFlowLayout Exploring UICollectionView further Implementing a custom UICollectionViewLayout Cell selection in collection views Working with lists in SwiftUI Creating our first SwiftUI project Building a list in SwiftUI The equivalent to creating a custom cell in SwiftUI Summary Further reading Chapter 4: Creating a Detail Page Technical requirements Implementing navigation with segues Creating our new details view Implementing and understanding segues Creating a manual segue Creating our layouts with UIStackView Containing labels in a stack view Passing data between view controllers Updating the data loading Passing the model to the details page Updating our outlets Best practices – creating a view model Summary Further reading Chapter 5: Immersing Your Users withAnimation Technical requirements Using UIView.animate and UIViewPropertyAnimator Creating our first animation Working with multiple animations Refactoring with UIViewPropertyAnimator Understanding and controlling animation progress Interactions with a pan gesture recognizer Adding vibrancy to animations Adding dynamism with UIKit Dynamics Customizing view controller transitions Implementing a custom modal presentation transition Summary Chapter 6: Understanding the Swift Type System Technical requirements Understanding available types in Swift Working with reference types Working with value types Understanding structs Understanding enums Understanding differences in types Comparing value types to reference types Differences in usage Deciding which type to use When should I use a reference type? When to use a value type Summary Chapter 7: Flexible Code with Protocols, Generics, and Extensions Technical requirements Understanding and implementing protocols Defining your own protocols Checking for traits instead of types Extending your protocols with default behavior Improving your protocols with associated types Adding flexibility with generics Summary Chapter 8: Adding Core Data to Your App Technical requirements Understanding the Core Data stack Adding Core Data to an existing application Creating a Core Data model Creating the models Defining relationships Using your entities Persisting data and reacting to data changes Understanding data persistence Persisting your models Refactoring the persistence code Reading data with a simple fetch request Filtering data with predicates Reacting to database changes Understanding the use of multiple instances of NSManagedObjectContext Refactoring the persisting code Summary Further reading Chapter 9: Fetching and Displaying Data from the Network Technical requirements Fetching data from the web with URLSession Understanding the basics of URLSession Working with JSON in Swift Updating Core Data objects with fetched data Implementing the fetch logic Updating a movie with a popularity rating Visualizing multiple threads Summary Chapter 10: Making Smarter Apps with Core ML Technical requirements Understanding machine learning and Core ML Understanding what machine learning is Understanding Core ML Combining Core ML and computer vision Understanding the Vision framework Implementing an image classifier Training your own models with Create ML Training a Natural Language model Training a Vision model Updating models remotely with Model Deployment Using the Core ML API to retrieve collections of models Preparing and deploying the model Encrypting Core ML models Summary Chapter 11: Adding Media to Your App Technical requirements Playing audio and video Creating a simple video player Creating an audio player Playing media in the background Recording video and taking pictures Taking and storing a picture Recording and storing video Manipulating photos with Core Image Summary Chapter 12: Improving Apps with Location Services Technical requirements Requesting a user's location Asking for permission to access location data Obtaining a user's location Subscribing to location changes Setting up geofences Summary Chapter 13: Working with the Combine Framework Technical requirements Understanding the Combine framework Understanding Publisher Understanding Subscriber Understanding Operators Understanding Subject Combining Publishers, Subscribers, and Operators Using Operators to build error-proof streams Summary Chapter 14: Creating an App Clip for Your App Technical requirements Introducing App Clips App Clip User Journey App Clips Invocation Methods Developing your first App Clip Creating the App Clip's Target Sharing resources and code with the App Clip Using Active Compilation Conditions Configuring, linking, and triggering your App Clip Testing your App Clip Experiences Summary Chapter 15: Recognition with Vision Framework Technical requirements Introduction to the Vision framework Recognizing text in images Region of interest Recognizing hand landmarks in real time Understanding hand landmarks Implementing hand detection Summary Chapter 16: Creating Your First Widget Technical requirements Introducing widgets and WidgetKit Widget options Widget guidelines Developing your first widget Creating a widget extension Implementing multiple-size widgets Providing the widget with data and configuration Refreshing the widget's data Summary Chapter 17: Using Augmented Reality Understanding ARKit Understanding how ARKit renders content Understanding how ARKit tracks the physical environment Using ARKit Quick Look Implementing the ARKit Quick Look view controller Exploring SpriteKit Creating a SpriteKit scene Exploring SceneKit Creating a basic SceneKit scene Implementing an Augmented Reality gallery Adding image tracking Preparing images for tracking Building the image tracking experience Placing your own content in 3D space Summary Chapter 18: Creating a macOS app with Catalyst Technical requirements Discovering Mac Catalyst Exploring new Mac Catalyst features Building your first Mac Catalyst app Exploring the iPad app Scaling your iPad app for Mac Optimizing your iPad app for Mac Summary Chapter 19: Ensuring App Quality with Tests Testing logic with XCTest Understanding what it means to test code Setting up a test suite with XCTest Optimizing code for testability Introducing the question loader Mocking API responses Using models for consistency Gaining insights through code coverage Testing the user interface with XCUITest Making your app accessible to your tests Recording UI tests Passing launch arguments to your app Making sure the UI updates as expected Summary Chapter 20: Submitting Your App to the App Store Adding your application to App Store Connect Packaging and uploading your app for beta testing Preparing your app for launch Summary Why subscribe? About Packt Other Books You May Enjoy Packt is searching for authors like you Leave a review - let other readers know what you think Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF