Chapter 4. Setting Up Our App
In Part I we looked at the tools you use to build applications on Apple platforms: Xcode, the Apple Developer Program, and the Swift language. Now we’re actually going to build an app using them!
In this chapter we will start building Selfiegram, an iOS app that lets us take new selfies and view old ones. It’s not a new idea for an app, but it lets us explore a great number of the different features of Swift and the various frameworks Apple has provided to build apps. By the end of this part of the book we’ll have a basic application that uses the images, location, filesystem, notifications, and map frameworks of iOS; then, in Part III, we will extend and polish it even further.
Note
Our goal isn’t that by the end of the book you’ll have an app capable of replacing an app like Instagram; we are simply aiming to show off how you’d actually go about building up an app such as this, while at the same time demonstrating just how much of the work of building apps is already done for you. So, even though Selfiegram might not be an original idea, there is a lot you can learn from it.
The application will be built up in small stages, with a little bit of code and UI work to do in each. We have tagged our repo on GitHub at each stage so you can look at how it progresses if you wish.
Warning
Throughout this book, we need to call some methods with rather long names—func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell ...