Configurable cache dir (#567)

* Add a configurable cache dir

* Fix UDL field position
This commit is contained in:
Ross Savage
2024-11-18 13:36:38 +01:00
committed by GitHub
parent f65a8ae2c3
commit 802e9eece7
16 changed files with 84 additions and 17 deletions

View File

@@ -20,12 +20,16 @@ open class SDKNotificationService: UNNotificationServiceExtension {
self.contentHandler = contentHandler
self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
guard let connectRequest = self.getConnectRequest() else {
guard var connectRequest = self.getConnectRequest() else {
if let content = bestAttemptContent {
contentHandler(content)
}
return
}
if connectRequest.config.cacheDir == nil {
connectRequest.config.cacheDir = URL(filePath: connectRequest.config.workingDir).appendingPathComponent("pluginCache").path
}
if let currentTask = self.getTaskFromNotification() {
self.currentTask = currentTask