Command Line Android Uploads on a Mac

I The main takeaway from this post is that you can use Fastlane Supply to upload Android APK files to the Play store on a Mac with exactly the same scripts as on Linux.

Initially, I thought I could just ssh to the Mac from my armchair and do it all via the command line. After all, Fastlane is entirely command line driven.

However, you need to remember that the Mac doesn’t have decent command line support. Step one of the Fastlane installation on a Mac is this

xcode-select --install

Which gave a message that implied it was going to work, but actually just opened a window on the desktop (where nobody was looking) asking for permission.

The second step is

sudo gem install Fastlane --verbose

Which failed with the usual cryptic error messages that the Fastlane installer gives when something goes wrong. Googling for selected excerpts from the errors told me it was probably because the xcode command line tools weren’t installed.

A bit of googling on how to install stuff headlessly on a mac revealed it’s not really worth it and you may as well just remotely connect to it and press ok on the box.

So, after the xcode tools installed, the Fastlane installer worked without issue.

My first test run seemed to kind of work, but right at the very end it said

###################################################
# fastlane 2.57.0 is available. You are on 2.56.0.
# You should use the latest version.
# Please update using `sudo gem install fastlane`.
###################################################

I did as it said and it’s not warned me again. I guess a new version came out in the couple of minutes time between me installing and trying it.

I added a blog entry a few days ago on using Fastlane to upload to the Play store from Linux. If you’ve read this one, you’ll probably find that one worth a look too.

One Reply to “Command Line Android Uploads on a Mac”

Leave a Reply

Your email address will not be published.