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.

app-showcase-flyingon

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…]

Announcing Intermediate iOS 8 Programming with Swift

At the time of this writing, the Swift programming language and iOS 8 have been around for more than 6 months. The new programming language has gained a lot of traction and continues to evolve. It is definitely the future programming language of iOS. If you are planning to learn a programming language this year, Swift should be on the top of your list.

I love to read cookbooks. Most of them are visually appealing with pretty and delicious photos involved. That’s what gets me hook and makes me want to try out the recipes. When I started off writing this book, the very first thing that came into my mind was why most programming books were not well designed. iOS and its apps are all beautifully crafted. But why do a majority of technical books just look like an ordinary textbook?

Intermediate Swift Programming

I believe a visually stunning book will make learning programming much more effective and easy. With that in mind, I set out to make one that looks really great and is joyful to read. That being said, it doesn’t mean I just focus on the visual elements. With over 300 pages and 30 Xcode projects, the book is written for developer with some programming experience on the Swift programming language and with an interest in developing iOS apps. The tips and solutions covered in this book will help you learn more about iOS 8 programming and empower you to build fully functional apps more quickly.

[Read more…]

App Showcase #2: Runr by Sam Spencer

Here comes to the second app showcase. Previously, we showed you an app created by a 17 year old developer. Since we published that story, we received emails from several young developers who also wanted to share their programming experience and app development stories. The world needs more programmers. It’s truly wonderful to see more young people learn to code and create something amazing.

In this app showcase, we talked to Sam Spencer, a 16 year old iOS developer who has released an app called Runr. The app allows you not just to track your runs, jogs and walks but save calories and distance of your runs to the Health app. Runr app is beautifully designed and has been featured by Apple in Health & Fitness “Apps For Your Run”.

runr-featured

Read on and check out Sam’s app development story.

[Read more…]

Creating a Sidebar Menu Using SWRevealViewController in Swift

As promised, here is the Swift version of the slide out sidebar menu tutorial. Again we will make use of an open source library called SWRevealViewController to build the sidebar menu. Though the library was written in Objective-C, you can easily integrate it into any Swift project. You will see how easy you can access and interact with Objective-C classes using Swift.

Okay, let’s get started.

In this tutorial, I will show you how create a slide-out navigation menu similar to the one you find in the Gmail app. If you’re unfamiliar with slide out navigation menu, take a look at the figure on the right. Ken Yarmost gave a good explanation and defined it as follows:

“Slide-out navigation consists of a panel that slides out from underneath the left or the right of the main content area, revealing a vertically independent scroll view that serves as the primary navigation for the application.”

Slideout sidebar menu demo in swift

From what I know, the slide-out sidebar menu was first introduced by Facebook. Since then it quickly becomes a standard way to implement navigation menu. Nowadays, you can easily find this design pattern in most of the popular content-related apps such as Inbox, Digg, LinkedIn, etc.
The slide-out design pattern lets you build a navigation menu in your apps but without wasting the screen real estate. Normally, the navigation menu is hidden behind the front view. The menu can then be triggered by tapping a list button in the navigation bar. Once the menu is expanded and becomes visible, users can close it by using the list button or simply swiping left on the content area.

You can build the sidebar menu from the ground up. But with so many free pre-built solutions on GitHub, we’re not going to build it from scratch. Instead, we’ll make use of a library called SWRevealViewController. Developed by John Lluch, this excellent library provides a quick and easy way to put up a slide-out navigation menu in your apps. Best of all, the library is available for free.
The library was written in Objective-C. But it is very straightforward to integrate it in your Swift project. You will learn how it can be done in a minute.

[Read more…]

App Showcase #1: AffordIt Budget Tracker by Andrew Walker

Last year, we published a series of developer stories to share the learning experience of some first-time app developers. We got great feedback about the stories and their experience inspired others to learn iOS programming. Starting this year, we’re going to bring you more developer stories and showcase their apps on a regular basis. The purpose of these developer stories is twofold:

  • Some said iOS programming is hard to learn. It’s true. It’ll take a lot of hard work to become a competent developer. However, iOS programming is not rocket science. With the release of Swift, it’s now even more approachable to beginners. As long as you put your effort in and are committed to take action, we believe you can build an app from scratch. The developers we interviewed are mostly amateur app developers. We hope their stories would encourage aspiring developers to learn programming and build their own apps.
  • Other than helping our readers learn programming, we always think how to help you promote your apps. With over 1,000,000 apps, the App Store is now extremely competitive. You probably have released your first app on App Store but only got a few downloads. Even if you have a high quality product, it’s not easy to break into the top 100. In the developer stories, we’ll feature an app created by the app developer. In average, we have over 200,000 monthly readers. This is not a big number but we are quite sure it would help your apps gain some exposure. From time to time, we’ll also share the stories with our email subscribers and on our Facebook page. Together we can help each other succeed.
affordit-featured

Without further ado, here comes to the first app showcase – AffortIt.
[Read more…]

Building a QR Code Reader in Swift

So, what’s QR code? I believe most of you know what a QR code is. In case you haven’t heard of it, just take a look at the image below. That’s QR code.

QR (short for Quick Response) code is a kind of 2-dimensional bar code developed by Denso. Originally designed for tracking parts in manufacturing, QR code has gained popularity in consumer space in recent years as a way to encode URL of a landing page or marketing information. Unlike the basic barcode that you’re familiar with, QR code contains information in both horizontal and vertical direction. Thus this contributes to its capability of storing larger amount of data in both numeric and letter form. Here I don’t want to go into the technical details of QR code. If you’re interested, you can check out the official website of QR code to learn more.

qrcode-featured

In recent years, the use of QR code has been on the rise. It appears in magazines, newspapers, advertisement, billboards and even name cards. As an iOS developer, you may wonder how to empower your app to read QR code. Some time earlier, Gabriel wrote a great tutorial on QR code. In this tutorial, we will build a similar QR code reader app but in Swift. After going through the tutorial, you will understand how to use the AVFoundation framework to discover and read QR code in real-time.

Let’s get started.

[Read more…]

Creating Hello World App in Swift Using Xcode 6

The Hello World tutorial was the first programming article written for our iOS programming course. As Apple released Xcode 6, the tutorial is no longer up-to-date. We received quite a lot of emails about the tutorial update. So here you are. Instead rewriting the same tutorial in Objective-C, we’ll show you how to create the Hello World app in Swift. What’s more, we create a screencast for you.

If this is the first time you come across the tutorial, you may wonder why we teach you building a Hello World app. This programming tutorial is written for absolute beginners. We want to encourage you to learn programming. So the first app should be very simple. Despite its simplicity, the “Hello World” app serves a few purposes:

  • It gives you an overview about the syntax and structure of Swift, the new programming language of iOS.
  • It also gives you a basic introduction to the Xcode 6 environment. You’ll learn how to create a Xcode project and lay out your user interface using Storyboard. Even if you’ve used Xcode 5 before, you’ll learn what’s new in the latest version of Xcode.
  • You’ll learn how to compile a program, build the app and test it using the Simulator.
  • Lastly, it makes you think programming is not difficult. I don’t want to scare you away from learning programming. It’ll be fun.

You’ll need to use Xcode 6 (or up) to work on the Hello World project. If you haven’t upgraded to Xcode 6, just download it via this direct iTunes link.

Okay, let’s get started.
[Read more…]