Getting the Latest Google Play Version Code with Fastlane

When using Fastlane you may find a need to fetch the latest Google Play version_code for you builds. Currently to do this we need create our own function which utilises google_play_track_version_codes. Below is the function which you can USE in your lanes to achieve this:

latest_googleplay_version_code.rb

You can then use this file in your lanes in one simple command:

version_code = latest_googleplay_version_code

Hope this helps you with deploying your app using Fastlane!

Photo by CHUTTERSNAP on Unsplash

--

--

Luke Brandon Farrell

Luke develops mobile applications using React Native. He writes about component-first architecture and design, code readability, and React Native.