mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 04:03:26 +01:00
feat(Operations): don't idle timeout during installations
This commit is contained in:
@@ -47,6 +47,7 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
|
|
||||||
let backgroundContext = DatabaseManager.shared.persistentContainer.newBackgroundContext()
|
let backgroundContext = DatabaseManager.shared.persistentContainer.newBackgroundContext()
|
||||||
backgroundContext.perform {
|
backgroundContext.perform {
|
||||||
|
UIApplication.shared.isIdleTimerDisabled = true
|
||||||
|
|
||||||
/* App */
|
/* App */
|
||||||
let installedApp: InstalledApp
|
let installedApp: InstalledApp
|
||||||
@@ -201,6 +202,7 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
do {
|
do {
|
||||||
try install_ipa(installedApp.bundleIdentifier)
|
try install_ipa(installedApp.bundleIdentifier)
|
||||||
installing = false
|
installing = false
|
||||||
|
UIApplication.shared.isIdleTimerDisabled = false
|
||||||
installedApp.refreshedDate = Date()
|
installedApp.refreshedDate = Date()
|
||||||
self.finish(.success(installedApp))
|
self.finish(.success(installedApp))
|
||||||
} catch let error {
|
} catch let error {
|
||||||
|
|||||||
Reference in New Issue
Block a user