Bluetooth Beacon Aquisition

I’m working on an interesting project for a client. It involves Bluetooth LE Beacons and there are lots of them in an the office. About 43 in the 10 metre square office space. But the problem is that not all the Beacons are being seen by our test handsets. I did some investigating.

It turns out that although Android and the Bluetooth LE spec don’t place a limit on the number of beacons in a given area at any one time, physics does. After you get to about 35 beacons in a small area the time taken to find further beacons increases exponentially. 

Given that the Beacons operate on the 2.4ghz part of the spectrum the issue is probably crowding, causing back offs from each device. To many individuals shouting at the same time. Whatever the cause, an interesting phenomenon.

I tested using a Samsung S7, a Nexus 5X and a Moto X (Gen 1). The Samsung performed best taking only 1.23 minutes to find all 43 beacons. The Moto took just over 6 and a half minutes. In dead last place, the Nexus took a huge 12 and a half minutes. Complete stats below. Times are given in miliseconds, except for the last row which is in minutes.

It will be interesting to compare performance on iOS compared to Android.


Screen Shot 2018 03 15 at 21 49 47Screen Shot 2018 03 15 at 21 48 36

Things 3 keeps getting better

IMG B142C20BE749 1

A while ago I was complaining that Things 3 was never going to get released. Now months later it still took too long, but I am happy and slightly surprised with the progress Cultured Code are making. 

Since the release of Things 3, there have been a steady stream of new features. The most important have been automation related;

  • Email to Things
  • A much improved URL scheme

Both these features have improved the utility of the Things apps. I have a number of IFTTT rules set up which send emails to my Things inbox as well as a few URL schemes which generate tasks with checklists (for things like App releases). At the moment I have these URL schemes triggered via Workflow on iOS, and Alfred on the Mac.

Hopefully the foundation that Cultured Code spent so long laying will continue to pay dividends to its users for a good long while.

The Ad-Mob

Screen Shot 2018 02 15 at 10 34 49

I recently ran into a very frustrating situation with Googles AdMob service. Just over a year ago I posted an update to an App called Intervals. The update added Ad-Mob advertising to the App and an option to remove the ads for a small fee.

All went well and money began to trickle in slowly.

A couple of weeks later my son was born and I forgot all about the app. To be honest I forgot about it for about 8 months.

When I logged into the Ad-Mob site I was informed that ads were no longer being served because Google needed to verify who I am. This in spite of a long history with google, an ongoing subscription to G-Suite, some activity in the Android Play Store, and a completed bank account verification process.

The verification process goes like this; Google posts out a verification number to my business address. So quaint. I then have to put that verification code into the Ad-Mob site. I didn’t receive any verification code and there seems to be no option to request another via their online form as I’m in the UK.

Ok, no problem, lets contact support and explain the situation to them! No.

Seems that with Ad-Mob you can only access support if the app is generating a certain amount of revenue. Since I’m not showing Ads, I have no way of generating that revenue.

I asked on the help forums. Some quite impolite people told me that it might be my fault and I should have jumped on this earlier. I told them I wasn’t a naughty child. I’m actually a good boy, but I’ve been busy and please could I not have detention.

I found a support email address and sent an email. No response from that.

So, I find myself with a small balance I can’t access, no ad revenue, no in app purchase revenue (because there are no ads too remove) and no avenue to resolve this problem with Ad-Mob. All quite Kafkaesque.

Perhaps I should develop my own ad system using referral links. It can’t be that hard can it?


I have a Plex set up at home. It did run on my 2012 iMac, a machine whose job is simply to run Plex and to be a monitor for my MacBook Pro. This iMac is connected to an ageing Drobo which acts as media storage and a local archive. It’s a set up that has worked wonderfully for me for years. However, keeping the iMac and the Drobo powered on all the time has a not insignificant cumulative cost in terms of energy consumption and hardware wear and tear. Add to that the ever more impressive array of content on Netflix, Amazon Video, iPlayer etc has meant I use the Plex server less and less. I still want access to my local files (both Locally and remotely). So I decided to do something I’d meaning to do for some time; make something with a Raspberry Pi.

It was amazingly easy. I purchased the following…

  • Raspberry Pi 3
  • 16gb Micro-SD Card
  • A USB power supply
  • A case

That all came to about £35, and I probably didn’t need the power supply. I also made use of an old 300gb hard disk I had laying around.

Not to ruin the end of the story, but it was amazed how easy it was and by how well it now works.

I’ll hopefully go into the following in more detail at a later date, but the steps I took were;

  • Install Raspbian (Debian derived OS). This was a doddle. You can download the image from their website and flash it onto a card, or you can just get a card with Noobs already installed on it. If you do the latter, it’s simply a matter of choosing an OS. The whole process is painless. Wifi works, sound works, it all “just works“. A far cry from my last experience (many many years ago) of trying to install Linux.
  • Install Open VPN. This makes it so much easier to work with the Pi. No need for desk space, monitors, keyboards and mice. I gave Pi a reserved address on the network and used Screens on my Mac and iPad to work on the Pi.
  • Installed Netcat. This allowed me to access the filesystem via my Macs. The Pi just pops up in the devices list in Finder. You can use SFTP as easily.
  • Installed and setup Plex. Again, easy to do and well documented online.
  • Plugged in the hard drive. This is where I ran into problems. As I configured the libraries in Plex, I found that I couldn’t’t read from the drive at it’s default mount point. After some reading I discover that I needed to permanently mount the device. I mounted it and made it point to a folder in my ~home/videos folder. You can find the instructions I used on

And really, that’s it. It took a couple of evenings of playing around. It now works wonderfully. It can transcode all but the biggest MKVs without a problem. It’s always available on or off my network, it’s. Totally silent and it sips power. If the iMac and the Drobo cost 0.5p and hour to run then this setup will pay for itself in less than 3 months.More importantly, my iMac and Drobo will last many years longer no they’re not been made to just sit powered on day and idle after day.

Silencing Warnings in Xcode

Lets face it, there are times when you just want to make Xcode stop showing you a particular warning. Turns out this is easy to do if you are compiling using the LLVM GCC. There are few options.

The nuclear option

Select your target and then select build phases. Find the file in the Compile Sources phase (by Eyeballing or by using the filter field in the top right). Double click on the file and enter -w in the box to turn off all warnings for that file.

Obviously you should use this with great care and you should take note of when it’s used. It will not be clear from the code that warning have been silenced.

You can find out more by taking a look at the Clang manual.

The tactial option

You can also silence warnings line by line. In Objective C you can use a clang diagnostic directive. The following example silences depricated calls using the -Wdeprecated-declarations directive. Other option are available.

#pragma clang diagnostic push
#pragma clang diagnostic ignored “-Wdeprecated-declarations”
// Your code goes here
#pragma clang diagnostic pop

Something similar is possible in Swift. For example…

@available(iOS, deprecated: 9.0)
func addressBookStatus() -> ABAuthorizationStatus {
return ABAddressBookGetAuthorizationStatus()


Weight is one of my oldest and most popular apps. Unfortunately it’s also one of the most neglected. Fortunately Apple, and some very kind, patient and understanding users have forced my hand; it is neglected no longer. I recently released version 3 of Weight with a new design and integration with modern iOS features such as Healthkit and Biometric identification. I’m looking to add loads of polish over the coming months. It’s still unapologetically minimalist and the fastest way keep track of your Weight, BMI and body goals. You can download a copy from the App Store.

What are we? What do we want?

It’s been party conference season in the UK. As usual we have the churn and tear of politics and as usual we don’t really have any articulation about how we will deal with anything outside the short and medium term.

The next 20 years will bring a revolution in technology that will create jobs, change the nature of work, put people out of work, raise new moral questions around personal liberty, privacy and the role of the nation state. Yet, we hear nothing about what we want the future to look like beyond the most general of statements about fairness and reduced waiting lists.

What kind of future do want, how do we achieve it? I would contend that we need to take three steps;

We need to start by looking at our values, independent of the technology or our place in the world. Do we we believe the individual has a right to privacy and how far does that right extend? Does the individual have a right to a certain standard of living irrespective of role in society? What are the responsibilities of the state and the individual?

Next we need to understand what is coming in the next 20 years. What will be the possible effects of technology if left unchecked? What is the darkest timeline and what is the most desired timeline?

Finally we need to regulate and legislate based on our values and understanding of what is likely to come. We need to be willing to constantly test and adjust our trajectory based on the realisation of the projected tends, because we will be constantly proved wrong in our assumptions.

In a very short amount of time, the UK will leave the EU. Now seems the perfect time to be defining who and what we want to be as a country. Whether you think we should be leaving the EU or not, now is a time that demands we have vision and hope. Who are we? What do we want?