突然出乎意料的是,我们的应用程序在开始生产或由 expo publish 发布后 1 秒不断崩溃。问题仅在 iOS(所有版本)上,android 工作得很好。经过一些调试,我们发现它在 App.js 的这段代码中崩溃了:
componentDidMount() {
Updates.checkForUpdateAsync()
.then((update) => {
if (update.isAvailable) {
Updates.fetchUpdateAsync()
.then((reload) => {
Updates.reloadAsync();
})
.catch((e) => {
console.log(e);
})
}
})
.catch((e) => {
console.log(e); - this line will catch
})
}
捕获函数 checkForUpdateAsync() 的错误:
[Error: The updates module controller has not been properly initialized. If you’re in development mode, you cannot check for updates. Otherwise, make sure you have called [[ABI40_0_0EXUpdatesAppController sharedInstance] start].]
之前的更新没有任何问题,这部分代码大约 1 年没有改变。
任何帮助将不胜感激,因为我目前处于死胡同。