mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 01:33:25 +01:00
[AltWidget] Initial version
This commit is contained in:
@@ -12,6 +12,7 @@ import UserNotifications
|
||||
import MobileCoreServices
|
||||
import Intents
|
||||
import Combine
|
||||
import WidgetKit
|
||||
|
||||
import AltStoreCore
|
||||
import AltSign
|
||||
@@ -1346,6 +1347,16 @@ private extension AppManager
|
||||
AnalyticsManager.shared.trackEvent(event)
|
||||
}
|
||||
|
||||
if #available(iOS 14, *)
|
||||
{
|
||||
WidgetCenter.shared.getCurrentConfigurations { (result) in
|
||||
guard case .success(let widgets) = result else { return }
|
||||
|
||||
guard let widget = widgets.first(where: { $0.configuration is ViewAppIntent }) else { return }
|
||||
WidgetCenter.shared.reloadTimelines(ofKind: widget.kind)
|
||||
}
|
||||
}
|
||||
|
||||
do { try installedApp.managedObjectContext?.save() }
|
||||
catch { print("Error saving installed app.", error) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user