umbertoghio / self-hosted-expo-updates-server

MIT License
136 stars 17 forks source link

`expo-constatns` expoConfig is not working as expected. #13

Closed a-eid closed 4 months ago

a-eid commented 9 months ago

I'm trying to display the app version via expo-constants but am getting undefined for Constants.expoConfig.version

import Constants from "expo-constants"

Constants.expoConfig.version // undefined. 
umbertoghio commented 9 months ago

Seems that the expo-constants has been updated, check the expo version and documentation https://docs.expo.dev/versions/latest/sdk/constants/#manifest

a-eid commented 9 months ago

I'm not sure I'm following, I thought Constants.manifest is already deprecated.

Screenshot 2024-02-13 at 4 21 11 PM

also I don't think the manifest has what I'm looking for version. I think for such use case it's recommended to use Constants.expoConfig

furthermore it does work before publishing an update, after doing so it stops working.

umbertoghio commented 9 months ago

you are right! I'll provide an update before Friday Thanks for pointing it out

umbertoghio commented 9 months ago

@a-eid sorry Ahmed but I didn't managed to look at this and I'm leaving for holiday.

Feel free to do a pull request and I'll approve it, alternatively please have some patience, I'll look at this in mid-march

a-eid commented 9 months ago

thank you @umbertoghio, am not sure where to start, but I'll try,

FYI this is expoConfig getter function from expo-constants

Screenshot 2024-02-16 at 8 11 50 AM

when updating my app, I tried copying over the generated expo config ExpoConfig.getConfig to dist/app.json but it does not seem to be working.

a-eid commented 7 months ago

@umbertoghio I wasn't able to fix this, do you maybe have an update on it ?

a-eid commented 7 months ago

when logging the expoConfig, I get this output which is not correct, this seem to be the list of assets from dist/metadata.json. any idea what could be causing it ?

Screenshot 2024-03-31 at 10 01 09 PM

BTW this is after running an update.

a-eid commented 7 months ago

@umbertoghio any updates on this, I'm not sure how to fix it TBH.

umbertoghio commented 4 months ago

Hello, sorry, due to additional projects I took I am unable to maintain / assist further on this