Statistics
15
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-06-20

AuthorAaron L. Bratcher

No description

AI Reading Assistant

Summary and highlights from this book's index; jump to passages in the text

Passage locations
Tags
No tags
Publisher: BPB
Publish Year: 2024
Language: 英文
File Format: PDF
File Size: 6.3 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
(This page has no text content)
  Creating iOS apps with Xcode   Learn how to develop your own app   Aaron L Bratcher   www.bpbonline.com
First Edition 2024   Copyright © BPB Publications, India   ISBN: 978-93-55516-695   All Rights No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means.   LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY   The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book.  
All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information.     www.bpbonline.com
  Dedicated to   My beloved wife, Pamela  
  About the Author   Aaron L Bratcher has over 20 years of development experience in a variety of programming languages and industries. After working on database applications, he spent a small amount of time writing web applications with Microsoft’s .Net. From there he found his niche in iOS programming where he has happily remained for over 10 years. From the day the Swift language was introduced, he strove to make it his primary development language. He has used it to create iOS apps for airlines, home automation, the hotel industry, banking, and more. He has also professionally used SwiftUI in multiple apps. In each organization he pushed for modernizing and simplifying the code. He is currently a Senior iOS Developer at JP Morgan Chase & Co.
  About the Reviewers   Edgar Nzokwe is a versatile polyglot programmer with expertise across various domains. His proficiency spans frontend technologies like JavaScript, React, and Angular, as well as backend development using Python and Java. Edgar is also well-versed in mobile development, working with frameworks like SwiftUI, UIKit, Java, and Kotlin.   In the realm of DevOps, Edgar is adept at utilizing tools such as Bitbucket pipelines, Jenkins, Terraform, Docker, Helm, Kubernetes, ArgoCD, and AWS to streamline and automate processes, ensuring efficient application deployment and management.   Outside of programming, Edgar indulges in his love for reading, delving into books on philosophy, politics, and fiction during his free time. This diverse range of interests enriches his knowledge and fuels his creativity and critical thinking, making him a well-rounded and insightful professional in the tech industry.  
Roman Zakharov is an experienced QA and Release Manager at Yousician, fostering collaboration with mobile app development teams to ensure smooth user experiences. His expertise lies in testing with Xcode and quality assurance within mobile application development. With an automation-based approach and a dedication to excellence, Roman crafts robust release processes and delivers high-quality apps using Xcode, Unity, JUCE, and other modern tools.   Additionally, Roman has authored several open-source tools for iOS development, showcasing his commitment to the mobile development community. Beyond his role, he also participates as a speaker in game development and testing conferences across European countries.   With a passion for ensuring flawless functionality across various platforms, Roman continues to make significant contributions to software engineering and quality assurance. His commitment to staying ahead of industry trends positions him as a trusted expert in the dynamic realm of mobile application testing and development.
  Acknowledgement   This book could not have been written without the constant support of my wife, Pamela. It is her continued encouragement that keeps me learning and writing.   I also thank BPB Publications for their guidance and expertise in bringing this book to publication. The editors and reviewers helped make this the best book it could possibly be.   Finally, I thank all those who have taken an interest in this book. It is my genuine desire for anyone who reads this book to learn and grow in the capacity of an iOS developer.
  Preface   There’s always room for improvement - this statement is a guiding light to everyone in the software business. It drives the industry forward as new features are added, bugs are fixed, or new ideas explored. It encourages hardware manufacturers to make more things possible than were available before. It sparks the imagination of those who wish to make their own software and make that glimmer of a vision come to reality.   The aim of this book is to help anyone, from the experienced professional moving to iOS development to the daring entrepreneur who has a bold idea on a new app, approach the task of iOS development with more confidence and an understanding of what it takes to make an app.   Starting with an overview of the deceptively easy-to- approach Swift language and moving on to the Apple provided way of displaying items on-screen and interacting with the user with SwiftUI. From there on, several concepts are introduced to give the reader the
necessary tools to make an improvement to the world of iOS apps.   Chapter 1: Introduction to Swift – Explores the Swift programming language through the use of a playground, an environment that allows the quick entry of code with immediate feedback. We learn about variables, object types, flow control, and more.   Chapter 2: Learn SwiftUI Basics for Creating a User Interface – After reviewing the basics of the Xcode workspace, we learn how to create a user interface with SwiftUI utilizing several basic generic elements. We also take advantage of nearly instant previews, eliminating the old edit, compile, and run cycle for simple changes.   Chapter 3: Creating Reusable SwiftUI Views – We learn to small views that can be reused throughout the app, giving utility and consistency for both the developer and the end-user.   Chapter 4: Design the Household Chores App – In this chapter we understand the first of the three apps; the household chores app which is used to assign chores to family members. Review the concept and create a project that shows the basic interface and interactions
along with the process of localizing text and making an app accessible to all possible users.   Chapter 5: Managing Data and Assets – Building on the previous chapter, we learn about data models and how to organize assets like colors and icons.   Chapter 6: Creating Units of Code that can be Shared – This chapter explores the modularity for the separation of concerns and ease of giving distinct areas of work to different developers is a common developmental goal. It also covers how to create a module that houses specific code that can be integrated into multiple apps.   Chapter 7: Saving Data – Leverage Apple’s recently introduced SwiftData to save data to the local device. Also discover how to create user defaults that can be set in the iOS Settings app.   Chapter 8: Charting Your Progress – Learn about Apple’s Swift Charts and the variety of ways they can be used. Then update the chores app to chart family member’s progress on completing their chores.  
Chapter 9: Create the New York City Schools App – The next app allows the user to see a list of schools in New York City along with their associated SAT scores. Create a new project with the appropriate interface and data structures based on the presented concept.   Chapter 10: Testing and Debugging – We learn how to ass unit and UI tests to ensure the app works as expected and continues to function properly as changes are made in the future.   Chapter 11: Networking – We learn how to download data from an internet resource asynchronously and parse it using Apple’s built-in libraries.   Chapter 12: Make it Public – We get familiar with the easy way of creating test users and publishing the app to them, and the general public.   Chapter 13: Make a Generic App – We learn how to build an app that can be branded and differentiated across multiple companies. We also use a modular approach to separate the UI and business logic and utilize asset catalogs to manage the distinct personality of each company.  
Code Bundle and Coloured Images   Please follow the link to download the   Code Bundle and the Coloured Images of the book:   https://rebrand.ly/szq1xtr   The code bundle for the book is also hosted on GitHub at GitHub Link :- In case there’s an update to the code, it will be updated on the existing GitHub repository.   We have code bundles from our rich catalogue of books and videos available at Check them out!   Errata   We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the
quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at :   errata@bpbonline.com   Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.   Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at :   business@bpbonline.com for more details.   At you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks.   Piracy
  If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material.   If you are interested in becoming an author   If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.   Reviews   Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions. We at BPB can understand what you think about our
products, and our authors can see your feedback on their book. Thank you!   For more information about BPB, please visit   Join our book’s Discord space   Join the book’s Discord Workspace for Latest updates, Offers, Tech happenings around the world, New Release and Sessions with the Authors:   https://discord.bpbonline.com  
  Table of Contents   1. Introduction to Swift   Introduction   Structure   Objectives   Download Xcode   Time to play   Variables   Collections   Optionals   Custom types
  Structs   Enums   Classes   Protocols   Closures   Flow control   Order of operation   Conclusion   Exercises   2. Learn SwiftUI Basics for Creating a User Interface   Introduction   Structure