I read the EAS Update docs and thought i understood it. Making the updates as followed:
eas.json:
"production": {
"channel": "main",
"env": { }
}
I did not name the channel: "production"
because I was under the impression when running eas update --auto
it will use the name of the branch I am on. So in this case, my "production" branch is "main"
.
In my app.config:
updates: {
url: 'https://u.expo.dev/hash-goes-here',
},
runtimeVersion: {
policy: 'appVersion',
},
and the Linked Branches
shows my last update as successful:
and the Update
shows my last update too:
I also have a useEffect to check, as suggested in the docs:
useEffect(function onFetchUpdateAsync() {
async function checkIt() {
try {
const update = await Updates.checkForUpdateAsync();
if (update.isAvailable) {
await Updates.fetchUpdateAsync();
await Updates.reloadAsync();
}
} catch (error) {
// You can also add an alert() to see the error message in case of an error when fetching updates.
console.error(`Error fetching latest Expo update: ${error}`);
Bugsnag.notify(error as Error);
}
}
if (__DEV__) return; //
checkIt();
}, []);
When I open my production app, I do not see the update. I tried uninstalling & reinstalling. I tried opening & closing multiple times.
Questions:
- Is it true that EAS Update will auto check without a
useEffect
when the app opens & closes? - When running
eas update --auto
, frommain
branch, is this correctly linked to myproduction
channel namedmain
? - Is there something else I am missing on this that would not make my updates appear?