Our Swift Programming Book for Beginners Now Supports iOS 9, Xcode 7 and Swift 2

Our flagship book, Beginning iOS Programming with Swift, has been fully updated for iOS 9, Swift 2 and Xcode 7. Not only is it compatible with latest version of Xcode and iOS, we will walk you through some new features of the SDK such as Stack Views and SFSafariViewController.

But one thing doesn’t change is our “learn by doing” teaching approach. We need you to take actions and write code. You will learn how to build a real world app from scratch. During the process, it will allow you to master Swift 2, Xcode 7, and iOS 9 programming.

The book is now available in PDF, ePub and HTML versions. For our existing customers, you should already receive the free updates.


As a high school AP computer science teacher I work mainly with Java but I also teach several other programming languages so I tend to keep a large library of books on-hand. While many of the other books and online video tutorials I purchased these past years were very good, I found AppCoda’s to be far above all others. Simon has a way of presenting a topic in such a manner where I felt he was teaching me in a classroom environment rather than just me reading words on a screen.
– Ricky Martin, Gulf Coast High School

Take a peek at the book, check out the sample chapters here. If you enjoy reading the sample, now is the best time to order the book!

Build Apps and Track Billable Hours [Sponsor]

You’re building an app. How much time are you spending on every feature, tweak, or bug fix? Harvest is a time tracking tool built for understanding where your time is going. And for developers, it takes the pain out of time tracking. You can start a timer right from your Mac, iPhone, or even GitHub.

Not only will you understand how much time you’re spending on client work, you’ll be able to turn your billable hours into an invoice from Harvest in minutes. Harvest integrates with PayPal and Stripe to make it easy to get paid.

There’s built-in reporting in Harvest that lets you see how long previous projects took, and you can leverage this information to make better estimates in the future.

Create a free 30-day trial today. **After your trial, enter code APPCODA to save 50% off your first month.**

Harvest - billable hour

Thanks to Harvest for sponsoring appcoda.com this week! This content is sponsored via Syndicate Ads.

Building a Simple Weather App using JSON and WatchKit

Editor’s note: This is a guest post by Gregory Tareyev, a co-founder and iOS developer of Chill (iamchill.co), the first wearable communication tool that lets you interact with your friends with a tap. In this tutorial, Gregory will share his experience on Apple Watch development and show you how to build a simple weather app using a third-party API and WatchKit. We have written a couple of tutorials about WatchKit. All of them are in Swift. Some readers mentioned if we can provide a tutorial in Objective-C. So here it is.

Enter Gregory’s tutorial.

Hello everybody! My name is Gregory Tareyev (tareyev.ru for any contacts). I am a co-founder and iOS developer of Chill (iamchill.co), the first wearable communication tool that finally makes sense. Recently we had a great experience on launching Chill on Product Hunt which gave us a lot of visibility in the community and attracted major tech blogs to cover the release. We are also discussing our involvement with a few accelerators and considering the best one. We worked really hard to build the app, but I assure you that everybody can do something like that.


Here, I want to share some experience on the app development for Apple Watch. It’ll be easy and fun.

[Read more…]

An Introduction to Stack Views in iOS 9 and Xcode 7

Earlier, we’ve talked about the new features of Swift 2. Starting from this tutorial, we will cover some cool new features in iOS 9. The upcoming version of iOS comes with a lot of new features. For developers, the introduction of Stack View deserves the first mention. I know some developers find it difficult to use auto layout to design complex user interfaces. Stack views are here to help and make our developers’ job much easier.

The stack view provides a streamlined interface for laying out a collection of views in either a column or a row. For views embedded in a stack view, you no longer need to define auto layout constraints. The stack view manages the layout of its subviews and automatically applies layout constrants for you. That means, the subviews are ready to adapt to different screen sizes. Furthermore, you can embed a stack view in another stack view to build more complex user interfaces. Don’t get me wrong. It doesn’t mean you do not need to deal with auto layout. You still need to define the layout constrants for the stack view. It just saves you time from creating constraints for every UI element and makes it super easy to add/remove views from the layout.

Stack View Introduction

Xcode 7 provides two ways to use stack view. You can drag a Stack View (horizontal / vertical) from the object library, and put it right into the storyboard. You then drag and drop view objects such as labels, buttons, image views into the stack view. Alternatively, you can use the Stack option in the auto layout bar. For this approach, you simply select two or more view objects, and then click the Stack option. Interface Builder will embed the objects into a stack view and resize it automatically. If you still have no ideas about how to use a stack view, no worries. We’ll go through both approaches in this tutorial. Just read on and you’ll understand what I mean in a minute.

[Read more…]

Creating a Slide Down Menu Using View Controller Transition

Navigation is an important part of every user interface. There are multiple ways to present a menu for your users to access the app’s features. The sidebar menu that we discussed in the earlier tutorial is an example. Slide down menu is another common menu design. When a user taps the menu button, the main screen slides down to reveal the menu. If you have no idea about how a slide-down menu works, no worries. Just read on and you’ll see an animated demo.

Before showing you how to implement the menu, this tutorial assumes that you have a basic understanding of custom view controller transition. For those who are new to view controller transition, you can check out this beginner tutorial written by Joyce.

Okay, let’s get started.


[Read more…]

App Showcase #4: What am I Flying On by Antoine Bellanger

It’s been a while since we published the last app showcase. Recently someone asked us why we can keep publishing programming tutorials. What motivates us to do that? Is it all about money? I admit we need to make money to keep this site running and publishing free stuff. But if money is just the primary motivation, we may not be able to keep doing it. There is something goes deeper. We love programming and we enjoy sharing what we know with others to help people learn iOS development. From time to time, we receive feedbacks like these:

“Just wanted to let you know that going through your Swift Book has allowed me to learn enough skills to have my first app accepted by Apple and available on the app store.” – Anthony

“Thank you for your information about developing for iOS using swift. I’ve got a lot of information and I learned such a lot of stuff reading your really excellent tutorials.” – Wilfried

“I wanted to thank you because your book is an amazing book to learn how to code. I am a 14 year old developer and now, with the help of your book, my second app is on the App Store!” – Antoine Bellanger

For anyone who teaches, the greatest satisfaction is to see the results of their work. It’s your support that motivates us to create better tutorials and inspires more people learn to code.

Okay, enough for us.


This week, we have Antoine Bellanger sharing his app development journey. He’s just 14 years old but has already released two apps on the App Store. He recently published his second app called What am I flying on. Keep reading to learn about his new app, what motivates him to learn programming and how he got started with iOS development.

[Read more…]

Core Data Basics: Preload Data and Use Existing SQLite Database

Editor’s note: This is a sample chapter of our new book, Intermediate iOS 8 Programming with Swift.

When working with Core Data, you may have asked these two questions:

  • How can you preload existing data into the SQLite database?
  • How can you use an existing SQLite database in my Xcode project?

I recently met a friend who is now working on a dictionary app for a particular industry. He got the same questions. He knows how to save data into the database and retrieve them back from the Core Data store. The real question is: how could he preload the existing dictionary data into the database?

I believe some of you may have the same question. This is why I devote this tutorial to talk about data preloading in Core Data. I will answer the above questions and show you how to preload your app with existing data.

Core Data - Preload data

So how can you preload existing data into the built-in SQLite database of your app? In general you bundle a data file (in CSV or JSON format or whatever format you like). When the user launches the app for the very first time, it preloads the data from the data file and puts them into the database. At the time when the app is fully launched, it will be able to use the database, which has been pre-filled with data. The data file can be either bundled in the app or hosted on a cloud server. By storing the file in the cloud or other external sources, this would allow you to update the data easily, without rebuilding the app. I will walk you through both approaches by building a simple demo app.

Once you understand how data preloading works, I will show you how to use an existing SQLite database (again pre-filled with data) in your app.
[Read more…]

App Showcase #3: FindMoreInternships by Vin Lee

As you know, from time to time, we feature apps developed by our readers, in particular for those who released their very first app. Here comes to the third app showcase. This time we talked to Vin Lee, the app developer behind FindMoreInternships, an app that provides internship information for college and high school students.

Vin will share with us how he came up with the app idea, learned to code and built the app. I encourage you to check out FindMoreInternships especially you are a student. If you’re still considering whether you should learn iOS programming, I hope Vin’s story will inspire you to kick start your app development journey.

AppCoda is Three Years Old!

Today marks quite a huge milestone for us. AppCoda is 3 years old! Time flies when you’re having fun. It’s been three years since I hit the Publish button and put out the first post on AppCoda. I started AppCoda as a side project and began to publish programming tutorials on a weekly basis. It’s a lot of fun and a rewarding experience. I really enjoyed helping people learn to code. I have learned a ton about the iOS SDK while developing the tutorials. The blog has also opened up some amazing opportunities to meet great people around the world.

The last two years has been a fantastic time of change. AppCoda is no longer a one-person blog. Gabriel and Joyce joined me as our regular tutorial writers. From time to time, we have some great developers contributing tutorials and sharing their development experience. Over the past three years, we have published more than 100 detailed programming tutorials and released three books. The blog has been visited by 2,600,000 people since its launch. This is fascinating. I never imagined it would reach so many readers all over the world.

AppCoda is three years old

We would like to say a big thank you to all of you that make our business possible. It’s so gratifying to know how many of you out there reading our tutorials to learn to code and build apps. Your feedback inspires us to grow and improve our materials. We will continue to create high quality programming tutorials (of course they are free) and develop more products to help you thrive.

[Read more…]