Skip to content

Commit

Permalink
Reschedule iOS task if configured to repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
NextNebula authored Oct 6, 2024
1 parent 312890e commit 83de667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/capacitor-plugin/ios/Plugin/BackgroundRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public class BackgroundRunner {
_ = try BackgroundRunner.shared.execute(config: config)

task.setTaskCompleted(success: true)

if config.repeats {
try self.scheduleBackgroundTasks()
}
} catch {
print("background task error: \(error)")
task.setTaskCompleted(success: false)
Expand Down

0 comments on commit 83de667

Please sign in to comment.