Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get publish or build date in Expo

I'm looking for a simple way to see the date of build in the Expo app, especially for developer builds.

Is there a way to read the publish or build date using an Expo API?

If not, is there a simple way to include the build date in the build? For example, a script that changes some part of app.json.

like image 852
cheesus Avatar asked Dec 03 '25 03:12

cheesus


1 Answers

I managed to do this using the extra property in the Expo config, see this expo guide.

I added the file app.config.js that dynamically modifies the Expo config:

export default ({
  config
}) => {
  config.extra = {
    'buildDate': new Date().toISOString().replace('T', ' ').substring(0, 19) + ' UTC'
  };
  return config;
};

And then you can use the buildDate in your app:

import Constants from 'expo-constants';
console.log(Constants.manifest.extra.buildDate);
like image 117
Martin Avatar answered Dec 06 '25 08:12

Martin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!