side project

Send Money with the Coinbase Swift Framework

Photo by Thought Catalog / Unsplash

I recently added the ability to send money using the Coinbase Swift Framework that we're building alongside Quids.

When going through the OAuth flow you need to add the CoinbaseAPIClient.Scope.createTransactions to your list of scopes:

let authScopes: [CoinbaseAPIClient.Scope] = [
    .createTransactions(sendLimit: 500.0, currencyCode: "USD", period: .day)

Then once you have the required permission you will need to build a SendMoney request and pass that to your CoinbaseAPIClient:

let request = CoinbaseAPIClient.SendMoney(to: ethAddress, amount: 2.5, currencyCode: "ETH")

coinbase.send(money: request, from: accountID, twoFactorCode: nil) { (transaction, errors) in
    // ...

You'll notice this function can also take a 2FA code. If Coinbase returns a CoinbaseAPIClient.APIError.twoFactorRequired error, you should ask your user for a 2FA code and then re-call the send money function with the 2FA code.

Here is an example of how we're doing this in Quids:

Introducing Forecast

Since I started freelancing earlier this year, my most valuable metric has been how much runway I have left (or "how long before I need to get a real job").

I use FreeAgent for all my finances. It’s a great tool, but it’s more about showing you your balance sheets and capital assets rather than the bigger picture.

So, I looked into forecasting software and found the likes of Float and Dryrun both of which look great... for large companies. I felt like I needed an accounting department just to get any value from them.

It's for this reason that I'm very happy to announce my latest project: Forecast.

Forecast is a bullshit-free forecasting service for freelancers. It’s built on one key principle: no additional input from you is required.

To me, being a freelancer is all about the flexibility and the freedom to work on the things you enjoy. You should be too busy working on your projects or having fun outside of work, not babysitting another finance system. Once you've connected your FreeAgent account, that's it! It just works.

Sign Up Now!

The iOS Simulator Scroller


Just over a week ago I decided to play around with Accessibility on macOS. I've always wanted the iOS Simulator to scroll when I scrolled with my mouse so figured this would be a good project to get started on.

Later on that day I had this:

Playing around with the accessibility framework. Put together an app that lets me use my mouse scroll in the iOS simulator 🎉

— Red Davis (@reddavis) March 13, 2017

A few people asked for me to release it and I figured why not? Would also give me a chance to try out Paddle which we have been thinking of using for Quids.

You can try out the iOS Simulator Scroller by visiting here.

Pact Coffee ASAP Button

I'm a long time subscriber to Pact Coffee (referral link), it's awesome and very reasonably priced.

It has a great feature where you estimate the number of coffees you drink per week so that they can send you your next bag just in time before your previous bag runs out.

Though, some weeks can be tougher than others and you suddenly find yourself quickly running out! 😵

No problem, you can just login to their website and click a button that says "Ship today", but by the time you have made you coffee, ate a biscuit, read an email and got back to your desk, you forget 😰 At least, this is what happens to me.

This week has been all about writing proposals, so I thought I'd take a break and write a simple one button iOS app that would change my order to "Ship today".

Pact do not have an API so I figured I'd have to just scrape their site. I threw together a small Rails app that would act as the API for the client. At first, I tried to use Mechanize though I then realised the Pact site is written in React (at least I think). Mechanize doesn't work with Javascript. To get around this I ended up using Capybara and PhantomJS. I built two endpoints: "auth" and "ship today".

The iOS app is super simple. It just implements the two API endpoints, stores the email and password in the keychain and I threw 1Password in there because every app should have 1Password integration.

Since I've built this hacked together API, it would be great to connect some sort of IOT button to it.