Preface

Why I Wrote Introducing iOS 8

I wrote this book for people with absolutely no programming experience. Most programming books assume the reader already knows another programming language or has a Computer Science degree. This assumption creates a large barrier to entry and increased confusion for beginners.

Introducing iOS 8 was designed for absolute beginners and serves as your own personal tour guide into the world of iOS programming. This book removes the confusing terms and jargon and replaces them with relatable real-world examples. It uses common occurrences like going to the grocery store, driving in a car, or eating at a restaurant to teach programming. Each chapter will explain concepts in clear, concise, relatable terms.

The goal of this book is to walk you from idea to App Store. This book will teach you the basics of programming, developing apps, and how to release your app to the App Store. No programming experience is required. You will learn to think differently and see the world from a new perspective. This book will give you the tools to change your life and the lives of others. Introducing iOS 8 removes the jargon and intimidation from programming.

Who Should Read This Book

This book was created specifically for absolute beginners. No computer science or programming experience is required. Anyone can do it.

  • This book is for anyone with an idea for an app.
  • This book is for anyone who loves their iPhone or iPad a little too much.
  • This book is for people who are interested in changing their life or the lives of others.
  • This book is for people who want to understand the power of technology and how to harness it.

People from all different walks of life have used this content to make apps. Here are just some of the people I have taught to make apps:

  • Designers
  • Product managers
  • Students
  • Grocery clerks
  • Baristas
  • Stay-at-home moms
  • Grandmothers
  • Personal assistants
  • Recruiters
  • Investment bankers
  • Doctors
  • Lawyers
  • Construction workers
  • Bank tellers

You can do it, too, and I am here to help.

Who Am I?

I am Steve Derico, the founder and lead iOS Developer at Bixby Apps. Bixby Apps is a mobile app development agency located in San Francisco that builds top-rated apps used worldwide by millions and works with Fortune 500 clients like BMW, Lenovo, and MGM Resorts. You can find our work at http://www.bixbyapps.com.

After teaching a few friends and family members how to make apps, I founded AppSchool.com. App School is an online app development school for absolute beginners. No programming experience is required. App School has taught hundreds of non-programmers how to make apps. It offers live online classes, video chat office hours, forums, video tutorials, code examples, contests, and book updates. You can learn how to make apps at AppSchool.com.

I know the barriers and obstacles of learning to program because I have been through them myself. I have guided hundreds through the jungle as well. I am here to be your guide and help you build your very own iOS app. Please contact me, and I will respond.

I enjoy wine, baseball, and running in my free time. I also love to hear from readers and answer their questions.

Navigating This Book

This book is organized to walk you from absolute beginner to your own app in the App Store. This book is best read from cover to cover in chronological order. If you do have some programming experience, I suggest reading from the beginning, as Swift may still be different from the languages you already know. This book covers Swift, a new language from Apple released in 2014. Swift is a young language, and will grow and evolve. Check for book updates and errata on AppSchool.com/book.

Tip

You can register as an official Apple developer and learn more about Swift at http://developer.apple.com.

If you read a chapter per day, you’ll have an app submitted to the App Store in less than two weeks. Hold on to this book as a reference after you have read through it from beginning to end. Each chapter will serve as a quick refresher when you come back to a particular subject. Some of the buttons and screenshots may differ based on your version of OS X. All screenshots in this book are taken using OS X Yosemite (10.10), but differences will be described for those using OS X Mavericks (10.9). Also, be sure to watch your capitalization and spelling when programming with this book. Capitalization and spelling matter!

Chapter 1, Getting Started
Covers the basics of the App Store, setting up your Path to Success, and installing Xcode on your computer.
Chapter 2, Introduction to Programming
Covers the basics of programming, including Model-View-Controller, and you will build your very first app.
Chapter 3, Diving into Swift
Learn the basics of Swift, variable types, collections, and loops, and build a Tip Calculator.
Chapter 4, Diving Deeper
Learn about methods, objects, and classes, and build a Race Car app.
Chapter 5, Building Multiscreen Apps
Covers view controllers, table views, and navigation controllers. Build your very own Passport app.
Chapter 6, Next Steps: Debugging, Documentation, and App Icons
How to fix issues, learn from the documentation, and improve the Passport app.
Chapter 7, Devices and Auto Layout
How to make apps for different screen sizes using Auto Layout. Improve the Passport app.
Chapter 8, Maps and Location
Learn to use the GPS to find a user’s location, create maps, and plot points. Build upon the Passport app.
Chapter 9, Camera, Photos, and Social Networks
Accessing the camera, viewing photos and videos, and adding Facebook and Twitter sharing to your app. Create an app called Selfie for taking front-facing photos.
Chapter 10, Running on a Device
How to run your apps on your iOS device. Build upon the Selfie app.
Chapter 11, Submitting to the App Store
How to set up the required contracts, create an App Store listing, and submit your app.
Chapter 12, Managing and Marketing Your App
How to manage your app once it is on the App Store, and how to update and market your app.
Appendix A
What is Objective-C, why you should know it, and how to read it.

How This Book Works and What You Need for This Book

Each lesson in this book is broken up into two distinct parts, lecture and exercise. The lecture portion will explain the terms and theories using real-world examples. In the exercise portion, you will learn by developing real-world apps like a Tip Calculator.

You will need a few items to get the most out of this book.

An Apple computer
You must have a Mac computer to develop for iOS. You cannot use a PC or iPad. Your Mac must also be running OSX Mavericks (10.9) or newer. If you do not already have a Mac, you can purchase one at http://www.apple.com. If you are on a tight budget, you can buy a refurbished model directly from Apple.
An iOS device
To build iOS apps, you must have an iOS device. This can be an iPhone, iPod Touch, or iPad. Your iOS device must be running iOS 7 or newer. If you do not already have an iOS device, you can purchase one at http://www.apple.com. If you are on a tight budget, you can buy a refurbished model directly from Apple.
Dedicated workspace
Learning to make apps is a different type of learning compared to learning history. Programming forces your brain to think differently and understand new perspectives. This type of learning requires a quiet area with no distractions. When you are reading this book, close your web browser, Facebook, Twitter, and Instagram. Dedicate a specific time period of your day just to programming. Only allow yourself to have Xcode open and dedicate learning time to learning.
Positive attitude
Learning to develop can be tough, but it can be incredibly rewarding when you create something people love or add value to someone’s life. Times will get tough; remember: you can do it, and nothing is impossible. Stick with it and think outside the box.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

Using Code Examples

Supplemental material (code examples, exercises, etc.) is available for download at http://appschool.com/book/.

This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Introducing iOS 8 by Steve Derico (O’Reilly). Copyright 2015 Steve Derico, 978-1-491-90861-7.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business.

Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.

Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://bit.ly/intro-ios8.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

I couldn’t have completed this book without the support from my family and friends. I want to take a moment and thank the people who made this possible:

Mom & Dad
Thank you for always believing in me no matter what. Thank you for providing me with the platform to succeed. I love you, and I am so proud to be your son.
Ben & Erica
To my brother and sister who love to keep me humble. You will always be my little brother and little sister. I will always be your big brother.
Veesta
To my wonderful, beautiful, passionate, smart, and hard-working girlfriend. You are always there by my side to support me through thick and thin. I couldn’t have done this without you.
Grammy, Grampy, Nana, and Poppy
To the best grandparents in the world. You have given me enough love and affection for five lifetimes.
Friends: Steve, Andy, Jeff, Andy, Mike, and Mike
Thanks for being the most trustworthy and reliable group of friends. Go Irish!
Mrs. Rapp
The professor at Notre Dame Preparatory High School who brought me into programming my sophomore year. You opened me up to a world that I could call my own. I wouldn’t be where I am today without your guidance. Thank you.
Jerry Baltes
My cross country and track coach at Grand Valley State University. Thanks for teaching me how to get better each and every day. Everything seems a little bit easier when I compare it to RoHo.
Gary Vaynerchuk
A big thanks to my favorite author and entrepreneur. You taught me if you want something, you have to take it. You also encouraged me to follow my passion and do what I love. Without this advice, I wouldn’t be where I am today. Thank you.
Everyone who doubted me
Without you, this book would not be possible. I will never give up.

Get Introducing iOS 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.