I just transitioned to SDK 37 and the Managed Workflow, and I’m having trouble with in-app updates (this is a multi-user app on a tablet that doesn’t get restarted often, so I check for updates when a user logs out).
Previously this worked:
import { Updates } from 'expo';
async checkForUpdate() {
const update = await Updates.checkForUpdateAsync();
if (update.isAvailable) {
this.updateApp();
}
}
async updateApp() {
await Updates.fetchUpdateAsync();
Updates.reloadFromCache();
}
I rewrote this as:
import * as Updates from 'expo-updates';
async checkForUpdate() {
const update = await Updates.checkForUpdateAsync();
if (update.isAvailable) {
this.updateApp();
}
}
async updateApp() {
await Updates.fetchUpdateAsync();
Updates.reloadAsync();
}
I haven’t gone deep into debugging, but the checkForUpdateAsync() promise never seems to resolve, so my loading animation just stops midstream and needs to be manually aborted.
Thanks.