fix: iOS app not starting

This commit is contained in:
Rainer Killinger
2023-12-02 19:44:19 +01:00
committed by Thea Schöbl
parent 8b5b4c765b
commit 66712bdd24
4 changed files with 13 additions and 9 deletions

View File

@@ -87,7 +87,7 @@
"@openstapps/api": "workspace:*",
"@openstapps/collection-utils": "workspace:*",
"@openstapps/core": "workspace:*",
"@transistorsoft/capacitor-background-fetch": "1.0.2",
"@transistorsoft/capacitor-background-fetch": "5.1.1",
"@types/dom-view-transitions": "1.0.1",
"capacitor-secure-storage-plugin": "0.9.0",
"cordova-plugin-calendar": "5.1.6",

View File

@@ -75,10 +75,10 @@ export class AppComponent implements AfterContentInit {
});
if (document.readyState === 'complete') {
requestIdleCallback(this.hideSplash.bind(this));
this.hideSplash();
} else {
document.addEventListener('readystatechange', () => {
if (document.readyState === 'complete') requestIdleCallback(this.hideSplash.bind(this));
if (document.readyState === 'complete') this.hideSplash();
});
}
}

View File

@@ -89,7 +89,11 @@ export class ScheduleSyncService {
async taskId => {
await Promise.all([this.postDifferencesNotification(), this.syncNativeCalendar()]);
await BackgroundFetch.finish(taskId);
BackgroundFetch.finish(taskId);
},
async taskId => {
console.log('[BackgroundFetch] TIMEOUT:', taskId);
BackgroundFetch.finish(taskId);
},
);