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.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With