ebook img

iOS 10 SDK Development: Creating iPhone and iPad Apps with Swift PDF

293 Pages·2017·7.82 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview iOS 10 SDK Development: Creating iPhone and iPad Apps with Swift

iOS 10 SDK Development Creating iPhone and iPad Apps with Swift by Chris Adamson, with Janie Clayton Version: P1.0 (March 2017) Copyright © 2017 The Pragmatic Programmers, LLC. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trust—you can use this across all of your devices but please do not share this copy with other members of your team, with friends, or via file sharing services. Thanks. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. About the Pragmatic Bookshelf The Pragmatic Bookshelf is an agile publishing company. We’re here because we want to improve the lives of developers. We do this by creating timely, practical titles, written by programmers for programmers. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com. Our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. We pioneered the beta book concept, where you can purchase and read a book while it’s still being written, and provide feedback to the author to help make a better book for everyone. Free resources for all purchasers include source code downloads (if applicable), errata and discussion forums, all available on the book's home page at pragprog.com. We’re here to make your life easier. New Book Announcements Want to keep up on our latest titles and announcements, and occasional special offers? Just create an account on pragprog.com (an email address and a password is all it takes) and select the checkbox to receive newsletters. You can also follow us on twitter as @pragprog. About Ebook Formats If you buy directly from pragprog.com, you get ebooks in all available formats for one price. You can synch your ebooks amongst all your devices (including iPhone/iPad, Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition. And, of course, you can always come back and re-download your books when needed. Ebooks bought from the Amazon Kindle store are subject to Amazon's polices. Limitations in Amazon's file format may cause ebooks to display differently on different devices. For more information, please see our FAQ at pragprog.com/frequently-asked-questions/ebooks. To learn more about this book and access the free resources, go to https://pragprog.com/book/adios4, the book's homepage. Thanks for your continued support, Andy Hunt The Pragmatic Programmers The team that produced this book includes: Andy Hunt (Publisher), Janet Furlow (VP of Operations), Susannah Davidson Pfalzer (Executive Editor), Rebecca Gulick (Development Editor), Potomac Indexing, LLC (Indexing), Nicole Abramowitz (Copy Editor), Gilson Graphics (Layout) For customer support, please contact [email protected]. For international rights, please contact [email protected]. Table of Contents Acknowledgements Preface About This Edition So Here’s the Plan Expectations and Technical Requirements Online Resources And Here We Go 1. Playing with Xcode 8 Tooling Up with Xcode Messing Around in a Playground Getting Serious on the Playground Digging into Documentation What We’ve Learned 2. Starting with Swift The Swift Programming Language Using Variables and Constants Counting with Numeric Types Storing Text in Strings Packaging Data in Collections Looping and Branching: Control Flow Maybe It’s There, Maybe It Isn’t: Optionals What We’ve Learned 3. Swift with Style Creating Classes Returning Tuples Building Lightweight Structures Listing Possibilities with Enumerations Handling Errors the Swift Way What We’ve Learned 4. Building User Interfaces Creating Our First Project The Xcode Window Building Our User Interface Placing UI Elements with Auto Layout Adding Images to the UI What We’ve Learned 5. Connecting the UI to Code Connecting Actions Coding the Action Connecting Outlets What We’ve Learned 6. Testing the App The Need for Unit Tests How Tests Work in Xcode Creating Tests Testing Asynchronously User Interface Testing Running and Testing on the Device What We’ve Learned 7. Handling Asynchronicity with Closures Understanding Closures Coding with Closures Care and Feeding of Closures Grand Central Dispatch What We’ve Learned 8. Loading and Parsing Network Data Fetching Network Data Mapping XML to Swift Types Parsing XML Combining XML Parsers What We’ve Learned 9. Presenting Data with Tables Tables on iOS Creating Table Views Customizing Table Appearance What We’ve Learned 10. Navigating Through Scenes Navigation Controllers Segueing Between Scenes Modal Segues What We’ve Learned 11. Fixing the App When It Breaks Logging Messages Taking Control with Breakpoints Setting Up Your Debugging Environment What We’ve Learned 12. Publishing and Maintaining the App Getting with the Program Preparing the App for Submission Uploading the App Testing with TestFlight Publishing and Beyond What We’ve Learned 13. Taking the Next Step User Interface Data Management Interacting with Other Apps Media, Graphics, and Gaming Real-World Interaction The Low-Level Frameworks What We’ve Learned Bibliography Copyright © 2017, The Pragmatic Bookshelf. Acknowledgements Ten versions of iOS (neé iPhone OS), and we’ve now managed to get Prags books out for half of them: 3, 6, 8, 9, and 10—more than half, if you recall there was no App Store or public SDK for version 1. Now that these releases have become an annual thing, we might finally be getting the hang of this. My thanks for the latest edition start as always with Pragmatic Programmers, who have an efficient, comfortable workflow that gets out of authors’ way and lets us write. (Rule number one for any competitors who might happen to be reading this: if you make authors use MS Word, add another two months to the schedule.) With Dave Thomas’s retirement in 2016, Andy Hunt is doing a fine job of running the ship, and it’s always a pleasure to work with the staff there, including Susannah Davidson Pfalzer and Janet Furlow. Most of all, it’s important to have an editor whom I click with. Rebecca Gulick keeps me from going too deep into the woods of pounding out replicable instructions and makes sure I deliver the “big picture” themes and ideas of every chapter. Finally, I want to give a shout out to Prags’s other iOS authors, including Jeff Kelley, Christina Moulton, Marcus Zarra, and Erica Sadun. And to Janie Clayton, who had other obligations and couldn’t be a big part of this edition, but is always available on Twitter for constructive feedback or at least pictures of cooking and pugs. I’ve had a day job doing Swift for a couple years now, and the important thing about it isn’t just the language, but also working in an environment where the craft and quality of the code is of such high importance. So thanks to all my colleagues at MathElf (http://mathelf.com) for all the rigor in peer reviews, and Dan Kokotov in particular for pushing me hard to move past twenty years of accumulated bad habits. In this edition, we’ve based our major example around writing a podcast client app. Part of the reason we did this is because there are so many good podcasts by and for iOS developers; hopefully, you’ll check some of them out. Thanks to the CocoaConf Podcast (Dave Klein, Daniel Steinberg, and Cesare Rocchi) and Core Intuition (Daniel Jalkut and Manton Reece) for letting us feature them in our sample code and screenshots. A big part of Prags’s books is the feedback cycle, and this title benefits greatly from the input of our tech reviewers: Zach Jaquish, Jeff Kelley (him again!), Kevin Kim, and Scott Stevenson. I’m also grateful to everyone who posted to the book’s forum or submitted errata during the book’s beta, including (but hardly limited to) Mark Horrocks, David Lindelöf, Noah Patterson, Sean M. Paus, and Robert Sherwood.

Description:
All in on Swift! iOS 10 and Xcode 8 make it clearer than ever that Swift is Apple's language of the future. Core frameworks have been redesigned to work better with Swift, and the language itself continues to evolve quickly.iOS 10 SDK Developmentis the pure-Swift approach to developing for the iOS p
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.