Reachability news

Release 4.3.0 of Reachability.swift is live today, updating to Swift 4.2.

Available on GitHub https://github.com/ashleymills/Reachability.swift or via CocoaPods https://cocoapods.org/pods/ReachabilitySwift

There’s also a new [reachability-swift] tag for StackOverflow questions - https://stackoverflow.com/questions/ask?tags=reachability-swift

NDAs

I received an email inquiry last week…

I am on the lookout for an experienced iOS developer for an iPhone App.
Ideally someone based in the London vicinity is preferable - and most importantly someone with the skills and attitude to be reliable in getting the job done right! If you are available and interested please let me know!

Well, that's definitely me!

I like to meet people and discuss projects face-to-face over coffee, so we set up a meeting in central London a few days later. But then this arrived:

Please find attached an NDA - it just makes us feel more comfortable having something signed on paper…

I don't sign NDAs. There’s a good chance that I have discussed or worked on a similar idea with another client, or might do so in the future, or have a similar app in my personal development schedule. Signing an NDA restricts my future business, and leaves me open to litigation. I politely told him this, and assured him that "our conversation will be completely confidential, and that your idea will neither be copied or passed on."

That put the breaks on our meeting, but he decided he'd still like to have a phone chat. 

And here's the kicker - after wanting me to sign an NDA to protect his idea, it turns out the idea was "copy another big selling app with some tweaks", and while I'm at it, had I worked on any similar apps for other clients? And could I copy that code to use in his app?

WTF?!? Unsurprisingly I haven't heard back from him!

More thoughts on Reachability.swift… and fame!

When I wrote Reachability.swift it was originally just to scratch a personal itch, plus a good Swift learning opportunity. As time went on though, other people began using it and it became apparent that having an open-source library is more than just putting the code out there and forgetting it.

Of course you have the pull requests to deal with, and often being busy with other things means these end up not being actioned as quickly as they probably should. And I need to keep an eye on StackOverflow, as people tend to raise issues there rather than on GitHub. Then there are the "my app doesn't work and I'll leave it to you to fix it for me" issues - 

Doesn't work
"Add Reachability.swift to my project and tried both closure code and notification code, but it does not work."

And there was Cocoapods and Carthage support. These aren't something I'd used prior to this project - but luckily the community that's growing up around Reachability.swift meant that there were people out there ready to help out.

What I really wasn't expecting though, was for the library to become popular. After a year or so, Apple still haven't released their own Swift version of Reachability, so it's looking like Reachability.swift is becoming the go-to library. It's been the feature of a little bites of cocoa tutorial, and mentioned on iOS Dev Weekly. The result of which, as of today, it's been forked 110 times and starred 1,138 times, which according to GitHub Awards, ranks me 4th in UK Swift developers and 92 worldwide. This week alone, it's been viewed on GitHub over 10,000 times, and cloned about 2,400 times. Fame at last!! ;)

Reachability.swift is on:
GitHub: https://github.com/ashleymills/Reachability.swift
CocoaPods: http://cocoapods.org/pods/ReachabilitySwift

Reachability.swift

About a year ago, while moving Foto Flipper from Objective-C to Swift, I found there was no native Swift replacement for Apple's Reachability code.

For those not aware, this is an Objective-C wrapper, supplied by Apple, on the SystemConfiguration framework C functions, allowing the app to see the current network connectivity state (wifi, cellular or none) and be notified of any changes. This lets the app handle poor or no connectivity gracefully, rather than failing on web service calls with an obscure error message.

Apple's code has been around since 2008, using NSNotifictions to signal connectivity state changes. Since 2011, however, the go-to code to do this has been Tony Million's open-source Reachability, which added block callbacks, making handling updates much simpler.

Taking Tony's code as my inspiration, I wrote version 1 of Reachability.swift - although it soon became apparent that Swift 1.0 wasn't quite up to the task. Versions of Swift prior to 2.0 didn't allow closures to be converted to C function-pointers, meaning a SCNetworkReachabilityCallBack couldn't be set. The work around was to fire a timer every half second an check the reachability status then.

Finally, with Swift 2.0 and closure to C function-pointer support, Reachability.swift was completed, and now is a Cocoapod and as of today, supports Carthage.

Reachability.swift is on GitHub: https://github.com/ashleymills/Reachability.swift

 

 

Keeping in the pink

I incorporated Flurry Analytics into the latest version of Foto Flipper to try and get a handle on who my users are.

The initial numbers are in and, to my surprise, it seems like the key market for the app is 17 year old girls. I'm not sure what I really expected, but thinking about it, if I'm aiming at the "selfie" market, I guess this makes sense.

Screen Shot 2014-04-15 at 15.41.16.png
Screen Shot 2014-04-15 at 15.41.32.png

So the question is, what do I do with this knowledge? The app is ad supported, so I'm looking for as many eyeballs as possible, and to keep them in the app for as long as I can. So to try and increase the former, I'm going to attempt to make the app a more appealing download to my target audience. Although I like the green colour, I think the app currently has a fairly sterile masculine feel to it. So along with other bug fixes in the next version, I'm giving it a new more friendly icon and re-skinning it to a nice bright pink. Let's see what effect this has.

Hosting trials and tribulations

I'll be hosting Curry Finder 5.0 with Digital Ocean. Previous versions used the free GoDaddy hosting that came with my domain registration, but I decided this was the time to get serious and start paying for a proper solution.

Digital Ocean is an all SSD setup, and their basic package is only $5/month, which seems crazily cheap, but perfect for development. I even scored $10 coupon on Twitter so it's been free for the first 2 months. $5 gets me a virtual private server with 512MB RAM, 20 GB SSD Disk and  1TB bandwidth.

I started with Ubuntu 12.04 and the default LAMP stack (installation instructions here) which includes PHP 5.3.10. However, I've been using MAMP 3 locally which includes PHP 5.5.10 - and some of the code I'd written wasn't backwards compatible (PHP 5.4 added array dereferencing), so I needed to upgrade the server version of PHP. Now, there seems to be a thriving Digital Ocean community, and each support article has plenty of comments attached, but these seem to be from people with a significantly greater understanding of the Linux world than I have, so finding a definitive solution was tricky. But, after a bit of searching I found this article which walks through the process. So a quick "snapshot of my droplet", half a dozen commands, and now I'm rocking' PHP 5.5.9. Easy!

Xcode keyboard shortcuts discovered

I just found out about two great Xcode keyboard shortcuts that blew me away (I get easily excited);

⌥⌘J

⌥⌘L

Filter in Navigator

Filter in Library

The sweet thing about these is that they pop open the left or right sidebars (similar to ⌘0 and ⌥⌘0) but without the animation. Thanks Daren.

Apple's full list of shortcuts can be found here.

Toolbox

Here's a list of the tools I'm using to build Curry Finder. I'm not claiming any of these to be the latest or greatest, but they're suiting me pretty well for now.

Xcode

Xcode 5.1 beta as I type. I'm building the app with storyboards - because every line of code I don't have to write is one I can't get wrong! And Curry Finder seems to be a good fit for storyboards.

MAMP

Mac / Apache / MYSQL /  PHP - really simple solution for setting up local MYSQL and Apache servers. One click and they're up and running, delete a folder and it's gone.

Espresso

I originally got this as part of a MacHeist bundle, and hadn't really touched it, but it turns out it makes a pretty good PHP editor. It's got code auto complete and auto publishing, but I'd like it to include more complete syntax checking (php -l).

Evernote

I originally used this to gather my thoughts, but it's transformed into a semi-project-management tool. Using the "notebooks within notebooks" feature, I have a notebook for apps, and within that a notebook for each individual app. Each app then has notes per version (one for design, one for development, …), the development one containing to-dos for my feature "backlog", tech debt, bugs etc. It's a sweet little setup for a solo developer, and I can update it from any device I have to hand. If you have a pro account, then you can share notes for other (non-pro) Evernote users to update.

Bitbucket

Git repo by Atlasian. It's free - what else can I say? Oh, and it integrates seamlessly with…

Tower

Git client. I've been using Tower since it was released, although if  I was picking one now I may have gone for another free Atlasian product, SourceTree. The apps are very similar in scope, although Tower has the better looking UI.

Acorn

Image editor. A polished, Mac native app, with the vast majority of Photoshop features I'll ever need, at the same price as 1 month of CC.

Charles

An HTTP proxy that easily allows you to monitor web traffic. Great for testing out those web service calls. You can see the request and response in various formats, blacklist urls, add breakpoints. Very useful.

Updating Curry Finder

The last release of Curry Finder (4.0) was is April 2012 - nearly 2 years ago. With the release of iOS 7, my apps look pretty dated, so I’m “refreshing the line-up”, starting with Curry Finder.

The app originally hit the store in back in May 2009 and much the code reflects that. Although parts were updated as it went along, I’ve decided it’s now time for a complete rewrite. I had a stab at updating the code a few months ago, but that was looking like a bigger job that starting again from scratch.

I’m (currently) building with Xcode 5.1 and the app will support iOS 7.0 and up, as there doesn’t seem to be anything in the betas to force me to 7.1 just yet.

Along with a refreshed app, there have been a few other major changes recently. I change my domain registrar from Godaddy to Hover.com (easy), moved my hosting from Godaddy.com to Digital-Ocean (I know very little about this but the process was reasonably painless), and I have this new Squarespace site, all of which I’m rather pleased with.