Right now I’m on my way from LAS to JFK to begin the last part of my North American trip (that started off with an amazing WWDC). Currenly I’m at an altitude of 34,999ft and the outside temperature is -44C. (Very Cold for my American friends)

I’m flying with Delta Airlines, and for those that don’t know – they offer free in-flight Wi-Fi for messaging. What’s interesting about this though, is that unless you purchase their ‘premium’ package, you’re restricted to only sending and receving text content (so no images or video) and only iMessage, WhatsApp and Facebook Messenger.

I tried the usual things, and here’s what I learnt.

  • Sending images does not deliver.
  • Similarly, receiving images are unable to be downloaded.
  • Sending a Digital Touch messages works, unless you make it an image (even if you write on said image).
  • Sending iMessage Apps’ messages works, unless they include an image in their content (you can send RulAR measurements)
  • Similarly, sending images over Whatsapp and Messenger also fails.
  • Connecting to a VPN works, but actually connecting to anything through that VPN does not.

But of course this wasn’t good enough for me – so I messaged Harish so we could come up with a workaround.
We first tried to Base64 encode the images, but this seemed to be too long to send over iMessage, so we instead came up with a different solution (in pure Swift) to encode the images as Hexadecimal, send that hexidecimal over iMessage and then decrypt it on the receiving machine.

It’s somewhat slow to encode (depending on the size of the image you are sending), but the fact that we actually got this to work was quite impressive and a fun (somehwat productive?) use of ‘inflight entertainment’.

Is this worth the time it takes to send an image?

No. It’s easier to just purchase an internet package for the flight, this was purely to waste some time.

Was it fun & would I do it again?

Yes and yes.

How did we do it?

We first wrote up some code in Swift Playgrounds to encode and decode the images, which we exchanged over iMessage. As I could only get iMessages on my iPhone (as the free messaging service isn’t offered for laptops) I had to AirDrop this code to/from my MacBook. This was a little painful but hey, when you have 5 hours to kill it’s not really that bad :)

Once the code was running in the playground, I had taken a string that Harish had encoded on his end, and was able to decrypt the image of me (at WWDC17).

This was really cool to see that we actually did it! I got an image at 35,000 feet in the sky without having to pay a cent (for Wi-Fi).
Now it was time to try the revese. To do this, I had placed an image into the playground file, and encoded this the same way the first image was encoded. Once I had the encoded string, I was able to AirDrop this to my iPhone, and then send it to Harish to decode. He was able to decode the image and we were both pretty satisfied at this point.

Bon Voyage!