23rd January 2018

As you may or may not know, I’ve been building my own iOS app for Manton Reece’s Micro.blog.

A short description of Micro.blog, if you aren’t already familiar:

A new social network and publishing platform for independent microblogs, created by Manton Reece.

Development is going well, and I’m nearly ready to announce the first beta version, but I thought I’d write about the current progress, and what you can expect to see in the first beta version. This development log will hopefully become a regular thing as I add more features to the app.

b0.1 – Read Only

The codename for this version is “Read Only”, and that stems from the fact that it will not have any ability to write posts. That is something I want to spend a lot of time getting right, and shouldn’t hold back a beta version from being released.

Right now, there are 5 main sections in the app:

  • Timeline
  • Mentions
  • Favourites
  • Discover
  • Profile

The first four are pretty much the same, except they present different lists of posts. But they are what you’d imagine.

On each post in these lists, at the minute you see the name and username of the author, the posts content (of course), and the date. Each post also has a favourite/unfavourite button in the top-right corner. Swiping right to left on these cells, will show you the full conversation relevant to this post.

I currently also do some basic link detection in posts, and if there’s a @ mention with a link to their Micro.blog profile, it will navigate to their profile page. Anything else at the minute will launch inside a Safari View inside the app.

In the profile page, for yourself, or other users, you currently only see the name, username, photo, and also the number of people you are following. You cannot see how many followers you have in any case. Tapping the following will show a list of all of these users.

The app currently supports both methods of authentication, app token, and also by requesting an email that contains a link to open the app.

I started on a side menu as well, which at the minute simply shows the version number. But this will be expanded heavily in the future.

What Else

Of course one thing I need to add, is the ability to log out! It will be placed in the side menu.

I also want to expand the profile pages, by adding the bio, and also a link to their website. And also, features surrounding the user that I want to add, is the ability to tap on a users image to open their profile, and also the ability to follow and unfollow a user.

Finally, I need to make some icons for the overall app (most likely a quick draft for beta purposes), the different tabs, and also one for the menu.

Screenshots

03rd January 2018

This is just something small in Swift/iOS that I find pretty handy, so I thought I’d share it just in case it can help.

So, the problem is that creating data that has to be presented in a UITableView can be somewhat complex, especially if you have multiple columns. This solution is geared towards quickly creating dummy data, but I think it could be expanded into an overall DataSource solution.

Anyway, we’ll start with the current way of managing sections. Usually, you would have some kind of enum that would correspond to a section integer, and also however many arrays of data for the number of sections. You would then either use the section enum to find the correct array. Or maybe you’d use a 2d array, and then use it as the index.

It just doesn’t see very Swift to me. In Swift, everything is simple, easy to read, and is pretty easy to write. So I thought I’d come up with a slight abstraction.

My first idea was to just make two structs, one for a Section, and another for a Table:

struct Section {
    var title: String
    var items: [String]
}

struct Table {
    var sections: [Section]
}

You could then go ahead, create individual sections, and add them to one table. Easy.

Example Data

Animals:

  • Cats
    • Tiger
    • Lion
    • Lynx
  • Bears
    • Grizzly
    • Black
    • Polar

Example Code

let catSection = Section(title: "Cats", items: ["Tiger", "Lion", "Lynx"])
let bearSection = Section(title: "Bears", items: ["Grizzly", "Black", "Polar"])

let animalTable = Table(sections: [catSection, bearSection])

I just find that a bit more readable.

It also makes the number of sections and rows a bit simpler:

let numberOfSections = animalTable.sections.count
let numberOfRows = animalTable.sections[0].items.count

However, you can add this functionality to the Table struct Which makes it much, much better.

Here is the definition of the ComplexTable struct:

struct ComplexTable {
    var sections: [Section]
    
    func numberOfRows(forSection section: Int) -> Int {
        if sections.count > section {
            return sections[section].items.count
        } else {
            return 0
        }
    }

    func numberOfSections() -> Int {
        return sections.count
    }
}

Which would make it this easy to get the row and section counts:

let numberOfSections = complexAnimalTable.numberOfSections()
let numberOfRows = complexAnimalTable.numberOfRows(forSection: 0)

So there you go.

It’s nothing big, and it won’t win many programming awards. But it’s a small piece of code that will certainly help me when I’m just messing around with tables, or I want a really clean and simple way to store small amounts of organised data.

01st November 2017

I finally got around to checking out the code for one of my apps, Qwiki.

Qwiki is a menu bar application, that lets you search and read Wikipedia articles. It can also open them in the browser, share differently formatted links, etc. But this isn’t an advertisement.

After updating it to 1.3 last year, I had other projects, university, and finding a job to do. So it got pushed right to the side. But I decided recently I wanted to modernise it, and maybe even look at adding new features.

That time hasn’t come yet, but I have spent the past few days going over the code, cleaning a few things up, migrating it to Swift 4, etc.

So in the mean time I fixed a couple of bugs, like when keyboard and mouse input get mixed up, escape key not always working, some design tweaks, and also added a preference to keep Qwiki open unless manually dismissed.

Now it’s been sent to Apple, I’ll have a few days off, and probably work updating another one of my apps. But in the very near future I plan on going back to Qwiki, and seeing what real features I can add!

If you have any ideas at all about Qwiki, then i’d be really happy to heat them. Even if it’s pure criticism, it all helps.

Check out the Qwiki website, or find it on the Mac App Store.

29th October 2017

Just over a week ago, I really wanted to set a plain colour background to my iPad. I had a quick look on the App Store, but nothing just did the feature I wanted. So I ended up starting my own mini project.

It took a few hours to make, and I had to make it support iPhone, iPad, and all the sizes they both come in. In the end it was probably as simple as the implementation could be, but that’s what I wanted myself.

The app can be broken down into 5 elements – three sliders for the hue, saturation, and brightness, followed by a save/share button so you can save the image or do whatever you want with it. Then there’s the background of the app, which shows the currently selected colour. So you literally get to see a live preview of the wallpaper.

Shortly after making this app, I thought back to my post on clearing out my current selection of apps on the App Store. But like I said in that post, some apps don’t require much maintenance, and I this app will fit in to that category. So although I do plan on keeping it up to date, you can see yourself how simple that will be.

Of course, I couldn’t charge for an app this simple. So it is available for free on the App Store!

15th October 2017

As I’ve been getting back into development for Hydrate (a water intake tracker for iOS), I’ve been thinking about the sort of representation of myself as a developer.

When I think of a great developer, they usually have a small number of apps. Sometimes they’re all at a really high standard, but most independent developers I see, have one or two main apps, and a few more fun ones.

I have been developing for iOS/macOS for quite a few years, and I have to say most of them are dead, stale, or heading in that direction. So it’s time for a clear out. This might not be a very interesting article, but I certainly think the act of me writing this, will aid in the process.

For some background information, here is the list of apps that I’ve made for iOS/macOS, and their current status.

Name Platform Status Description
Hydrate iOS/watchOS Available. My current work-in-progress, a water intake tracker.
Pretty Regular Expressions iOS/macOS Available. Regular expression tool for macOS/iOS. Very simple.
Pixels Sticker Pack iOS Available. Some pixel art iMessage stickers!
AniMatchers iPhone Available. Just a fun memory matching game, with cartoon animals.
Bill Splitter iOS/watchOS Available. A super basic bill splitter. Mainly a small project so I could check out the watch SDK.
Qwiki macOS Available. My wikipedia menu bar app, which is one of my best projects in my opinion, which I will hopefully update soon.
Tap Gap iOS Available. A quick game for iOS, where you try and tap the screen when a line is between a certain gap.
Floppy Turd iOS Available. An awful, but funny remake of Flappy Birds. It took a sunday morning to create, and that was where I left it.
TinyMe iOS/macOS Removed. One of my first few apps, they used the goo.gl api to shorten longer links, but they aren’t an issue anymore.
Postie macOS Available. I used to blog on Scriptogram, and this was a basic Markdown editor with publishing built in. The service has unfortunately shut down.
The Girlfriend Helper iOS Removed. I think the first app I made. It was an app that suggested message you could send to your girlfriend depending on the event type.
Halloween FX iOS Removed. Basic soundboard app, which also featured a timer so you could hide your phone and scare someone.
The Farm iOS Removed. Even more basic soundboard app, just contained farm animals.
Bug Splatter iOS Removed. This was a weird one, there’s multiple levels of bugs/difficulty, and the aim was to splat as many of them before they reached the end of the screen.
Whack iOS Removed. A pretty simple whack-a-mole game, but with pixel art, and funny noises.
TextShot macOS Never made it. This was a really fun project to work on, it was going to be an app where you could select a bunch of text, and it would generate a picture from it, even including multiple different styles. Sadly the MacBook I was using at the time died completely, and I wasn’t clever enough to think about source control back then.

Okay, I didn’t actually know I already removed a few of these already. But there’s still some clearing out to do.

My aim is to have a small number of applications, that either are stable, and need hardly any maintenance, or ones that I can regularly keep updated, and are proven to be worthwhile.

So if you just take the apps I have available, there’s 9. Well one isn’t released yet, but it’s in progress.

  • Hydrate
  • Pretty Regular Expressions
  • Pixels Sticker Pack
  • AniMatchers
  • Bill Splitter
  • Qwiki
  • Tap Gap
  • Floppy Turd
  • Postie

If I separate them into the groups I mentioned before, I’m left with this:

Maintainable Apps:

  • Hydrate
  • Qwiki
  • Pretty Regular Expressions?

Minimal Effort/Stable Apps:

  • Pixels Sticker Pack
  • Tap Gap

Left over:

  • AniMatchers
  • Bill Splitter
  • Floppy Turd
  • Postie

That was pretty quick and easy, and it sort of represents what I already had in my head. Out of the four left over, they all have very good reasons why I don’t want to support them anymore. Low download numbers, super old code, and lack of interest to work on them again.

So, they’re be removed.

That leaves just five remaining apps, three I feel that are maintainable, and the other two are kind of eternal to an extent.

Of course Hydrate will stay, I mean I haven’t even released it, and it’s still in active development. Qwiki is stable, and my most popular app, so that will also stay.

Pretty Regular Expressions however was initially well taken, but I haven’t had any desire really to go back to it, and improve it. I will have a look at the code again, and hopefully I can add something to make the app even better soon.

Pixels Sticker Pack is a bunch of images, and I can’t see myself ever needing to update these. They’re fun, and I still enjoy using them!

That leaves Tap Gap, it’s a simple game, that still works fine. I’ll certainly make a few changes and support the iPhone X soon, but that is only a minor issue.

So the remaining apps, along with their pricing are:

Name Price
Hydrate Not decided.
Qwiki £2.99
Pretty Regular Expressions (iOS/macOS) £0.99
Tap Gap Free
Pixels Sticker Pack Free

Not a bad bunch!

I’ll be checking out a few of these projects today, and maybe even get thinking about the changes/updates I can make!

If you want to follow on with more detail, just follow me on twitter!

11th August 2017

There’s a lot of occasions where I’m checking the specific iOS icon sizes, and I remember I made a document a few years ago with some references. However, there’s been a huge amount of changes since then. So I decided to create a new reference document from the Xcode 9.0 beta.

It’s hosted as a Gist on Github, or you can view it below:

I’m going to make an effort to keep this updated, and I’ll probably create one for the other platforms as well. Anyway, I hope people find this useful!

28th July 2017

I’ve been working on a new app for a while now, and I’ve been meaning to write about it here on my blog, but I just keep putting it off. But as the beta process has been going for a while, and I think the development has progressed to a more stable (I mean slow) development cycle. Probably not good for most of my projects, but I’m treating this as a more long-term project. More specifically, I want to do each step well, so that in the end it’s a product that I want to use myself, and potentially a lot of other people too.


So, a slight break here, so I can explain what this project actually is.

In the simplest terms – it’s a water intake tracker for iOS. Being slightly more descriptive – it’s an app where you can manage your water intake, get a quick glance on how you are doing compared to your daily goal, and also look back and see how hydrated you were in the past.

That’s not the final description however, as I have many things I want to add to the application (which I will describe below), and I’m probably also missing out features that I’ve already implemented.

Oh and it’s called Hydrate. Original, I know.


There was no big reason for the app, except that I wanted to start tracking my water intake, and as an app developer, I thought I’d put the two together. I was actually asked on Twitter about the difference between Hydrate and other “competing” apps, my answer was what I just said – I’m making it for myself. If other people enjoy it, then that’s even better!

The layout and overall design is aimed to be as simple as possible, and therefore is designed around having “Quick Add” buttons, which you can set up with default quantities, making it even easier to add water intake. Mainly because, it’s not fun entering data as boring as this, so if I can make it quick, I will.

At the moment, the current features are:

  • View daily intake.
  • Add predefined quantities via Quick Add buttons.
  • Add custom amounts.
  • Set a daily goal – Which is the basis for the main ring.
  • Support for ml and fl oz (US).
  • Dark/Light mode – I just have to have a dark mode, and the other one is for “normals”.
  • View your past water intake (last 21 days).
  • Today widget with Quick Add buttons, to do it even faster.

Of course that’s not all the features I want to add, therefore I have a basic list of future main features:

  • Watch App
  • Make the ring animate.
  • Possible reward for hitting the daily goal.
  • A way to share your progress.
  • A maybefeature – Some way to add a drink when you start drinking it, which you can then tap to add to the actual data when it’s finished.

I’m most likely going to add more to this list, but that’s what I want to definitely (apart from the last one) add before I release.

If you want to try out Hydrate, then the beta process has already started, just enter your email on the Hydrate website, and I’ll add you to the TestFlight group!

15th February 2017

If you follow me on Twitter, you’ll already know this, but I’m now developing a regular expression app for iOS!

It’s called “Pretty Regular Expressions”, and I’m going for a minimal approach, but with some optional settings, and a clean interface. Of course a dark theme was the first thing I built!

It’s still in development, but it’s moving pretty fast, so an open beta is very imminent. I already have a landing page, where you can subscribe to keep updated with the application. Of course I will only send out an email for when the beta opens, and then when the app is released.

If you want to watch the progress of the development, then just follow me on Twitter at @chrishannah, because I post a lot of screenshots.

12th October 2016

I’m getting back into programming, and I’m messing around with PHP and MySQL to create a sort of upload manager for myself.

I just want a place where I can quickly upload an image/video, and then be able to share it with people on Twitter.

So far I’ve got a working database with a file viewer, and a few extra bits. I guess I just need a dashboard for myself, and it’s a working project.

Anyway, check it out on GitHub!