Skip to content

Commit

Permalink
Fix swift URL init compatibility (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeross authored Nov 18, 2024
1 parent 802e9ee commit 0750e2e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ open class SDKNotificationService: UNNotificationServiceExtension {
}

if connectRequest.config.cacheDir == nil {
connectRequest.config.cacheDir = URL(filePath: connectRequest.config.workingDir).appendingPathComponent("pluginCache").path
var workingDir: URL
if #available(iOS 16, *) {
workingDir = URL(filePath: connectRequest.config.workingDir)
} else {
workingDir = URL(fileURLWithPath: connectRequest.config.workingDir)
}
connectRequest.config.cacheDir = workingDir.appendingPathComponent("pluginCache").path
}

if let currentTask = self.getTaskFromNotification() {
Expand Down

0 comments on commit 0750e2e

Please sign in to comment.