Chris Hannah

Play Old Classics with Pocket Arcade for iOS 🕹

f you’ve ever been to an arcade, then you’ll know that there are a few classics that you always go back to. In Pocket Arcade, you get to experience the four main ones. They are even managed by coins, so there’s a chance to run out of money just like in real life.

You’ve got UFO Catcher, which is a grabbing style game. It’s not as weak as the ones in real life, but it can still become equally as irritating when you just miss a prize. Then there is Mayan Coin Pusher, which is the coin machine we all have probably left too much money on. Alien Whacker is the class Whack-a-mole game, and this is really fun. And lastly, there is Hoop Hero, which is a mini version of the basketball shooting game, which I find to be really suited to the iPhone.

All the prizes you collect are stored in the Gallery, and there are over 200 different prizes to collect at the moment.

I’ve seen similar games on the iPhone already, but this little collection of games are very well designed, and there’s also chances of more getting added in the future.

You can download Pocket Arcade for iOS for free on the App Store.

Track the Countries You’ve Travelled to with “been” for iOS

If you like to travel, then it’s pretty much guaranteed that you’d be interested in mapping out where you’ve actually been. This is because I’m exactly the same. I’ve come across a few apps in the past that are complex travelling journal type applications, but they never seem to stick with me, because they’re just too much.

Well today I’ve found another app for iOS called “been”, which does the job in a near-perfect way.

With been, you add all the places you’ve travelled to, and it then colours in these on a map. The only choices you have are to add a whole country, or an individual U.S. state. In a perfect world I’d like to specify each city I’ve travelled to, but this is a minor issue.

But once you’ve added your travels, then you get to check the maps out. You can choose to either view a 2D map, or a 3D globe, which can be exported as an image or video respectively. If you want to make your map a bit more specific, then while viewing the 2D map you can select a continent which will show you just that on a map.

Maps

After adding all of my travels, apparently I’ve only been to 4% of the world, which I certainly need to improve on! But I’ve generated both the 2D World map image, and the 3D globe video, which you can check out below as an example.

2D World Map

3D Globe Video

If you want to mark up your travels on a map like I did, then you can download “been” for iOS from the App Store for free! It works on both the iPhone and iPad. 🌍

Todoist for Mac

I’ve been a user of many different task managers over the years, but one I’ve tried before, and what I’ve finally settled on is Todoist.

My main philosophies regarding task managers are that they should be stable, and by that I mean it should be something you can rely on, you should be able to view your upcoming tasks everywhere possible, and the syncing should be very fast. With all of these requirements, Todoist is the choice that makes the most sense, because at a fundamental level it is a web service, not just a collection of apps, which makes it a super stable platform.

Projects

The main way to organise tasks in Todoist is by assigning them to projects, which you can also further organise with sub-projects. I have split my tasks into context relevant projects, so for example I have a University project, and inside this I split up any coursework or big chunks of work into a sub-project. This structure makes it much easier to visualise your tasks, especially when you input a load of small tasks like I do.

As you can see in the screenshot above, I also use emoji in my project names. This is just so I can find the right section at a quick glance. There’s also the added benefit of using an emoji first in the project name, which is that it always puts these at the top of the list. This is because an emoji character will always come before the usual alphabetical characters. Luckily I only have a few top-level projects, so this doesn’t affect my list.

Labels and Filters

Another away to organise and view your tasks is by using labels and filters. Labels offer a separate way to collect tasks together, which can of course be used in conjunction with projects. A common use of this is to have labels such as “admin” or “writing”, or even time-based names such as “quick” so that when you only have a specific amount of time available to get some work done, you can find suitable tasks can be completed.

Filters are ways to view your tasks, by applying some criteria to fine-tune your results. If working in a team, viewing tasks assigned to different users would be quite helpful, but I don’t personally make use of them.

Adding Tasks

The three main ways you can add a task is by using the “Quick Add Task” method, which is accessed pressing the “+” button, or by hitting the “q” key while in Todoist, by pressing the “+” button or by pressing the “A” or “a” key to add a task to the top or bottom of the current list, and also by using the “Quick Add Task” method outside of the app.

With apps such as Fantastical, inputting data has become much easier with the support of real language entry. So if I want to to add a task for university I can simply open up the Add Task view by pressing CMD + SHIFT + A, and then by typing “Finish Lecture Notes #University”, this will add a task with the entered name, and subsequently organise it into the University project. You can take this even further by adding dates and labels, so when I decide I want to write about an app, I can add a task like “Write about App X today #TheAppLife @Writing”. It’s a feature that once you learn how to make use of all the little tricks, you will really love to use.

Overdue Tasks

Something I haven’t seen before in other task managers is a ways to quickly reorganise overdue tasks. It is a feature that Todoist has, and one I have found to be very useful, especially when I plan way too much work for one day and end up leaving a few incomplete.

Todoist’s “Smart Schedule” is an AI powered feature that uses your habits, the urgency of tasks, your upcoming tasks, and even uses learned patterns from the other Todoist users, to help find the the best suited day to fit them in. So far the suggestions have been pretty spot on for me.

Your Productivity

This is a feature that it’s use continues to elude me, by competing tasks, and keeping up streaks, Todoist grants you “Karma”. These are all calculated by configurable goals, and I guess gives you a glance on how well you’ve been performing.

Fortunately for me, it doesn’t affect the usability of the app, because I don’t see myself making use of this in the future.


What I’ve found Todoist to be, is a fully featured, easy to use, and stable task manager to can really adapt to my own needs. I would recommend this to all users that are wanting to start using a task manager, and see if it fits them.

You can download Todoist from the Mac App Store, and find out about the other platforms on the Todoist website.

Getting Started with UITableView: Populating Data

This article is part of a collection of articles about Swift Basics, where I try to explain different parts of Swift development in a more understandable way.


In most iOS applications, you will probably need to use a UITableView at some point. In this short guide, you will find out how to create a UITableView, and populate it with your own data.

UITableView

As Apple say in the documentation, “A table view displays a list of items in a single column.”. Basically, it’s a list of cells, that you can take complete control over. With a UITableView object, there are two ways in which you can control them. They are the UITableViewDelegate, and the UITableViewDataSource. The delegate is what manages the interactions on the table cells, such as selecting and reordering. The UITableViewDataSource is as you may of guessed, what controls the data that populates the table, and also configures the cells in the Table View. However in this guide, we will just be focussing on the DataSource, as this is all we need to populate a TableView with data.

Styles

There are various ways in which you can customise the style of the TableView manually, but there are two main styles that you can choose from in the InterfaceBuilder, “Grouped” or “Plain”. There aren’t many differences, but in the “Plain” style, each cell fills the Table, and the relevant header/footer float above the cells. However in the “Grouped” style, the sections are visually separated into groups, with the addition of a background colour.

Creating the Project

We’ll start with a new Xcode project. So create a new iOS project, and select the “Single View Application” template. Then you can give it a name, for this example I’m using “TableViewExample”.

Just make sure the Language is Swift, and the other options aren’t needed for this example. This will create all the necessary files, such as “AppDelegate.swift”, “ViewController.swift”, and “Main.storyboard”.

Putting a UITableView on the Screen

Click on the “Main.storyboard” file, and from the object library on the right, drag a Table View onto the view (There should only be the one).

Then to make sure it works on all iOS devices and screen sizes, we’ll set up the layout. Just drag the corners of the TableView so that it fills the view, but keeps the top status bar visible, it should automatically align. Select the Table View, and then open up the “Add New Constraints” view from the bottom right corner. It is the icon with a square, which has a vertical line either side.

Once you constraint view appears, select the four lines around the square at the top, while making sure each value is 0. This will simply make it fit to the edges on any screen size.

Configuring the UITableView

Now we need to configure the Table View so that we can manage it later on. So select the Table View, and then click to show the “Attributes Inspector” from the right sidebar.

The only values you need to change are:

  • Content – Dynamic Prototypes
  • Prototype Cells – 1
  • Style – Grouped

All we are doing with these settings, is making the cells in the table dynamic, so that we can update them with live data later on. Then we set the style to grouped, so we can see each section better visually.

UITableViewCell

As we also want to populate the cells with some data later on, we will make use of the dynamic prototyping in Interface Builder, to design the cells.

Firstly we will set a “Reuse Identifier” for the cell, this is so that we can reuse the same cell prototype when loading the TableView. To do this, just select the cell (it may be easier to do this in the Document Outline to the left”, and while still showing the “Attributes Inspector”, set the Reuse Identifier to “PlainCell”.

Linking the UITableView to the ViewController

We will manage the Table View from the initial View Controller, so the next step is to set it as the DataSource of the Table. You can do this programatically, but for this example we will do it using Interface Builder. To do this, select the Table View, and then choose the “Connections Inspector” in the right sidebar.

From there, just click and drag from the open circle to the right of “delegate” and “dataSource” to the View Controller icon at the top of the view. Then in the “ViewController.swift” file, we will need to set the class to be the DataSource. Just replace the current class definition:

class ViewController: UIViewController {

To the following:

class ViewController: UIViewController, UITableViewDataSource {

It will show some errors right now, but that is just because we haven’t implemented the required functions yet.

Populating the Table View

We have the Table View set up in Interface Builder, and it’s linked to the View Controller, so now it’s time to populate it with real data. At the top of the View Controller class, just below the code you’ve just written, copy the below code:

let sections = ["Fruit", "Vegetables"]
let fruit = ["Apple", "Orange", "Mango"]
let vegetables = ["Carrot", "Broccoli", "Cucumber"]

This is just three arrays that will be used for the section headings, and the content of each of them.

UITableViewDataSource

To fill the table with data, we need to write four functions to do the following:

  • Set the headings for each section.
  • Set the total number of sections.
  • Set the total number of rows in each section.
  • Configure the individual cells with the relevant data.

Section Headings

We already defined the section headings before, so all we need to do here is to return the string for the associated section, which the function receives as an Int.

func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
    return sections[section]
}

Number of Sections

This is quite a simple method, and it just tells the TableView how many sections there are. We already have the section headings in an Array, so we can just return the count value of this.

func numberOfSections(in tableView: UITableView) -> Int {
return sections.count
}

Number of Rows

Very similar to the method above, but this time we have slightly more complexity in how we return the value of the number of rows. As this method is for every section, we first need to check which section it is for, and then return the count value of the relevant array.

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  switch section {
  case 0:
    // Fruit Section
    return fruit.count
  case 1:
    // Vegetable Section
    return vegetables.count
  default:
    return 0
 }
}

Configure the Cell

The last part of populating the Table View, is to load the data into the cell. We do this by first creating a UITableViewCell object, by making use of the dequeueReusableCell(withIdentifier:) function. This uses the Reuse Identifier we set earlier, to dynamically reuse one of the cells that have already been created. Then depending on the section that the cell is in, we set the text of the text label of the cell, to the value from the relevant array. After this, the cell is returned, and it is displayed.

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  // Create an object of the dynamic cell "PlainCell"
  let cell = tableView.dequeueReusableCell(withIdentifier: "PlainCell", for: indexPath)
  // Depending on the section, fill the textLabel with the relevant text
  switch indexPath.section {
  case 0:
    // Fruit Section
    cell.textLabel?.text = fruit[indexPath.row]
    break
  case 1:
    // Vegetable Section
    cell.textLabel?.text = vegetables[indexPath.row]
    break
  default:
    break
  }

// Return the configured cell return cell

}

Results

If you run this project now, it should look like this:

Final Code

Here is the final code for the View Controller that we created:

class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {

let sections = ["Fruit", "Vegetables"] let fruit = ["Apple", "Orange", "Mango"] let vegetables = ["Carrot", "Broccoli", "Cucumber"]

override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. }

// MARK: UITableViewDataSource

func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { return sections[section] }

func numberOfSections(in tableView: UITableView) -> Int { return sections.count }

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { switch section { case 0: // Fruit Section return fruit.count case 1: // Vegetable Section return vegetables.count default: return 0 } }

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { // Create an object of the dynamic cell "PlainCell" let cell = tableView.dequeueReusableCell(withIdentifier: "PlainCell", for: indexPath) // Depending on the section, fill the textLabel with the relevant text switch indexPath.section { case 0: // Fruit Section cell.textLabel?.text = fruit[indexPath.row] break case 1: // Vegetable Section cell.textLabel?.text = vegetables[indexPath.row] break default: break }

// Return the configured cell return cell }

}

You can find the example project on GitHub.

Congratulations! You’ve now developed an app that makes use of a UITableView, along with a UITableViewDataSource to dynamically populate data, and also to configure the UITableViewCell. As this is an ongoing series of articles, you can expect more guides on how to take this project even further.

Dates and DateFormatters in Swift

This article is part of a collection of articles about Swift Basics, where I try to explain different parts of Swift development in a more understandable way.


While doing some development in Swift, using Dates and DateFormatters, I found the task of going through every format option quite boring. So this is a quick “cheatsheet”, that anyone can use to identify what style of Date/Time they want to display, and also the code to get it.

Of course, you first need to create a Date object, which used in this way will generate the current date/time. Then you will also need a DateFormatter object, which handles the formatting, and is used to output the result into a usable String.

let date = Date()
let dateFormatter = DateFormatter()

Date

Full Date

Output: Wednesday, March 8, 2017

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .full
let stringOutput = dateFormatter.string(from: date)

Long Date

Output: March 8, 2017

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .long
let stringOutput = dateFormatter.string(from: date)

Medium Date

Output: Mar 8, 2017

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
let stringOutput = dateFormatter.string(from: date)

Short Date

Output: 3/8/17

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .short
let stringOutput = dateFormatter.string(from: date)

Time

Full Time

Output: 1:26:32 PM Greenwich Mean Time

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.timeStyle = .full
let stringOutput = dateFormatter.string(from: date)

Long Time

Output: 1:26:32 PM GMT

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.timeStyle = .long
let stringOutput = dateFormatter.string(from: date)

Medium Time

Output: 1:26:32 PM

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.timeStyle = .medium
let stringOutput = dateFormatter.string(from: date)

Short Time

Output: 1:26 PM

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.timeStyle = .short
let stringOutput = dateFormatter.string(from: date)

Date and Time

You can of course, use the dateFormat and timeFormat together to output the date and time in the same string.

Here is an example:

Output: March 8, 2017 at 1:37 PM

Code:

let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .long
dateFormatter.timeStyle = .short
let stringOutput = dateFormatter.string(from: date)

Download

I’ve made a Swift Playground containing all of the formats for date and time, which you can use yourself by copying the code from GitHub.

The Original Apple Watch is a Steady Favourite

The very first Apple Watch was released 21 months ago, in April 2015. It was to me, a revolutionary new product, and I just had to get it. So I did.

In September 2016, 18 months after the original Watch was released, Apple then updated the original model, naming it Series 1, while also releasing a whole new version, Series 2.

You could argue that the Series 0 (first edition) to 1 change wasn’t even worth noting, the only main difference was that the Apple S1 processor used in the Watch was replaced with a dual-core variant. However in the Series 2, they added a newer Apple S2 processor which was also dual-core, but also an ambient light sensor, 50 m water resistance, 2x brighter display, and a GPS sensor.

So we can all agree that Series 0 → 2 was a decent update.

Therefore, you would expect that because of this, along with the fact that the Series 0 is a version 1.0 of a new product, that the need and desire to upgrade would be huge.

Except for me, it wasn’t. And it still isn’t.

My Watch

My Watch is a 42 mm Sport in Space Grey with the original matching Sport band, it still provides the same use as when I first purchased it, but now so much more.

At The Beginning

When I first started using the watch, the main feature that I used was the notifications. This was the major benefit for me, as it meant when I was on the move, be it walking or on the train for example, I didn’t have to keep taking my phone out of my pocket to find out what was trying to catch my attention.

Since then, I have rethought my take on how I manage notifications, but this has been a steady constant on the benefits of wearing the Apple Watch.

Of course, like everyone else, I thought the Apple Watch would be the kickstart I needed to become more active. I would start a new workout whenever I was walking somewhere, or maybe I’d try and jog, or maybe I would take an extra trip somewhere simply because I knew it was tracking me.

Then there was the apps, they took an awfully long time to load, and at the beginning they were run off the paired iPhone, so even at runtime they weren’t the best experience. Although in September 2015, Apple released watchOS 2, which meant that apps could be installed directly on the watch, and therefore would be faster. This was slightly the case, but it still wasn’t the best situation, as sometimes it would be much faster to take your phone out of your pocket, than it would be to just do the simple task on your wrist.

By wearing my watch more often, I was getting more comfortable with it, sometimes even forgot I was wearing it. Slowly I was realising that the things I was using my watch for, simply were being forced, and I didn’t actually want to do them. I just wanted to use the watch.

watchOS 3

With the release of watchOS 3 in September 2016, the Apple Watch was suddenly brought back to life.

This update brought significant increases to the speed of the device, which was helped out largely by the new Dock. By choosing to keep apps in the dock, the system would automatically keep them in memory, and therefore would be quicker to load. Alongside the speed benefits, there was also a bunch of new watch faces, and a huge overhaul to the way that the watch worked.

It also meant that because of these updates, developers were more likely to spend more time working on quality apps for the device, since they were able to provide a better experience for their users.

This really was the rebirth of the Apple Watch.

This Moment in Time

So right now, my watch has become a really essential part of my life, and it’s started to feel like it’s providing me with a use.
Here are the main things I now use my watch for:

  • Telling the time.
  • Notifications (Only for certain apps).
  • Checking what’s next in my calendar.
  • Weather.
  • Monitoring my activity and health.
  • Tracking my sleep.
  • Pokémon GO (yes I still play it).

Before I go into the “smart” side of the watch, it still is a watch, so I of course use it for the time. But very much like the iPhone, the “native” use of the device isn’t what brings people to use it.

Then there were the notifications, these have been narrowed down to the very few things that require my attention. So I have Messages, a select few email notifications from Airmail, and the occasional thing such as OneFootball when I want to specifically be updated about a game when I’m out doing something.

Recently I’ve been trying to use my calendar more and more, for university lectures, events, and time-sensitive events like flights. Because of this, knowing my next calendar event is essential, as the more I rely on the calendar as my primary schedule, I relinquish control over monitoring what I should be doing. Fantastical has a brilliant app for iOS, and I use their complication on the watch to check my next event, and with a simple tap I can quickly get a list of any other events in the future (made possible by the speed increases I watchOS 3).

It’s a similar situation to the weather, with DarkSky I can have a simple complication that updates super fast, so I can find out the weather in a few seconds.

In what has become a more silent feature of the watch, is the activity and health tracking. As I’m always wearing the watch, I get an accurate measurement of my activity throughout the day, how much I’ve walked, and of course my heart rate is also monitored. I don’t have any health conditions that I need to worry about, but it’s nice to know I have all of this data being logged without me doing anything.

In addition to the health tracking that is done automatically by the watch, by using an iOS app called AutoSleep, I can track the length and quality of my sleep by wearing my watch at night. It still of course needs to be charged, but as I’m sat at my desk, or when I’m not doing anything that involves moving around or needing to receive notifications, I pop it on my little watch stand, and it’s charges pretty quickly. The app uses a whole bunch of metrics to measure the sleep, such as the last time you used your phone, whether it’s on charge, or if you’re moving. But it’s the way in which you manage the sleep tracking is what got me, you just go to sleep. There’s no need to manually say “I’m going to sleep”, you just do it, and it knows. It’s the silent processes of the watch that makes me really love it.

So I’ve got the time, notifications, calendar, activity monitoring, and sleep tracking, there must be something I do on the watch for fun? Well, I do use the Pokémon GO watch app, in companion to the iOS game, in order to gain workout based rewards. It’s the closest to a game experience I have on the device, and it also doubles as a workout tracker, so there’s something else behind it as well.

I wouldn’t say there’s that much else that I use the watch regularly to do. Sometimes I control what I’m listening to, via the Music or Overcast app. As mentioned before, I use the OneFootball app to keep updated on certain football games. Once in a blue moon I use a timer, and that’s probably the only thing I use Watch Siri for. The only other thing I’ve been using is the iOS Wallet, which brings up my boarding passes whenever they’re needed.
When I look back at all of these activities that I now do on my watch, I can clearly see that it has become so much more than a time-telling, notification bringing device.

My Watch as an Appliance

Right now, I use my watch a lot. But even so, it’s not something I desperately need to get any better. I like it how it is.
With the benefits that came with watchOS 3, the device was given a new lease of life. Which made it feel like I’d already purchased a new watch.

I no longer need to worry about it syncing to my phone, whether the apps will be refreshed in time, or even about the speed of the hardware. It’s transformed to yet another computer that sits on my wrist, to a stable appliance that I can trust.

What I Still Don’t Like

Of course nothing is perfect, and I would like a few improvements to be made to the watch experience. But these are mainly down to the software, something that can be changed without the need for me to purchase a new device.

I really don’t like the grid layout of the apps, and I think that a redesign there would be a great improvement. But saying that, the way I interact with my watch is through complications via the watch face, or by launching apps from the dock.

I would also encourage the ability to customise the watch faces even further, so you would be able to have a more custom design and colour options.

The iPad is a More Efficient Writing Device

Can you do real work on an iPad?

Well if the real work is writing, then I argue that it is probably better at it than most other devices.

A writer’s provisions are the tools they use, and their imagination. This is why a lot of effort is put into finding and using the appropriate tools, because it allows the focus to be on the writing.

In my opinion, because of the writers need to focus on what they are writing, the best tools are the ones that don’t make themselves a distraction from the end goal. The ideal environment needs to adapt to the writer and not the other way around, which is where I think the iPad fits in perfectly. It’s of course, not a new product, but still the argument on whether work can be done on it successfully continues (although this seems to be dying out).

With the iPad, you have a fully portable device that is not only able to be taken anywhere, but it’s also able to be used anywhere. It also benefits from the consumerism around the device, because this has led to a wide array of accessories being made, such as external keyboards, stands, and now the Apple Pencil. Especially with iOS being such a flexible platform, and apps for pretty much every single scenario.

I have a MacBook Pro and while I like to write using it, I still find the iPad to be more suited to the job. With tasks like visually organising notes and ideas with the touch screen, or making use of the Apple Pencil, it’s as if you’re really interacting with the content, without any unnecessary distractions.

Also, it may sound strange, but the Workflow app for iOS is another reason for why I favour the iPad for writing, as it makes all the management tasks associated with writing much more streamlined and adaptable. The way I think of the comparison between writing on an iPad and writing on my Mac, is the ratio on which actual writing is done, compared to the time you spend managing your writing and the related process. For me, my Mac is okay for longer-form writing pieces where I spend a long time writing, that the amount of time editing, submitting to blogs, embedding images, and so on isn’t a big deal. On the other hand, with my iPad I have all of my processes automated with apps such as Workflow, Opener, Trello (Trello has a website you can use), so I can focus on the writing, regardless of the situation.

I of course can’t complain too much, because my Mac is the newest MacBook Pro, so it’s super light, and the keyboard is nice to type on. But I still believe the iPad edges out in front.

An iPad may take longer to get used to, and maybe a while to find and configure the writing tools for you. But once you’re there, you’re free to just write.

Imposter Syndrome and Failure

Nathan Jeffery on Imposter Syndrome and failure :

In a world where people like Elon Musk are literally building rockets and cars that run on energy from the sun it’s easy to look at your own life as an entrepreneur and feel like a bit of a failure or be totally dismissive when people acknowledge your success or compliment you. Sure maybe you’re not changing the world at the same scale as Elon but you are no doubt having an impact on countless people’s lives through job creation and that alone is commendable.

This was a nice little read, and I agree with everything he says.

Putting Your Xcode Project on GitHub the Easy Way

Warning: This guide is now outdated since Xcode has changed a lot since it was first published. A new version of this guide, Using GitHub and Xcode Together, is available and is based upon Xcode 10.1.

Developers are always talking about whether to use Git from the command line, or via a GUI such as GitHub Desktop. Well, if you’re using Xcode, then there’s a much simpler method that’s already built-in! It’s called Xcode Source Control[1].

I’m just about to upload one of my projects to GitHub, so I thought I’d share the process. Especially as I’ve recently found it so much easier to use, because it’s right there in Xcode!

Step 1

The first step is to let Xcode create a Git repository on your Mac. It should be checked by default.

Step 2

Then you will need to create a new repository on GitHub. Give it a name, description, and make it Public/Private. But make sure you don’t select “Initialize this repository with a README”.


Then select “Create Repository”.

Step 3

Then you’ll be redirected to a page where you’ll be asked to set up your repository. You only need one thing from this page, and it’s the URL in the Quick Setup section.

In my case, this is https://github.com/chrishannah/CH-Work-Item.git.

Step 4

Now it’s time to add this into Xcode.

Simply select Source Control from the menu bar, your project name, and then select the “Configure project” option.

Once you’ve done that, the next step is to select the “Remotes” tab, then select the + button in the bottom-left corner, and select “Add Remote”.

Here you will need to give it a name, and an address. The address is the URL previously found on the GitHub set up page. Then press “Add Remote”.

Step 5

The repository has now been created on GitHub, and added to Xcode, the next step is to initialise the repository.

Again, from the menu bar, select Source Control, and then Commit.

A window will appear with all the changes to the repository, since this hasn’t been initialised yet, it will show all of your projects files.

Simply add a commit message, select “Push to remote”, which should automatically select your GitHub repository, and press “Commit X Files and Push”.


If you haven’t connected your GitHub to Xcode before, you will be prompted for a username and password, these are your GitHub details.

That’s It!

Once you’ve completed all of the previous steps, your project should now be on GitHub, and if you go back to the repository on GitHub, it should now be populated.

If you haven’t already (like me above), it’s probably best to add a README file.

Managing Your Repository

From here it’s really easy to manage your repository in Xcode. It’s all found in the Source Control menu.

From there you can commit new files, push them to GitHub, pull any new changes, and anything else you’d expect from a Git client.


I hope that this guide proved useful, and provided a bit of piece of mind for you knowing that your project is now essentially backed up.

If you want to see the other tutorials I have here, then there is a Guide section.

You can find me on GitHub as chrishannah.


  1. For more information, there is a session from WWDC 2013, “Understanding Source Control in Xcode” that explains this in more detail ↩︎