Skip to content

Commit

Permalink
Merge pull request #190 from DP-3T/feature/ignore-background-flag-aft…
Browse files Browse the repository at this point in the history
…er-13.6

Also retrieve last TEK in background task on iOS > 13.6
  • Loading branch information
UBaggeler authored Jul 15, 2020
2 parents d2dd15f + 8a750b9 commit acd4834
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Sources/DP3TSDK/Background/OutstandingPublishOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ class OutstandingPublishOperation: Operation {
continue
}

if runningInBackground {
// skip publish if we are not in foreground since apple does not allow calles to EN.getDiagnosisKeys in background
logger.log("skipping outstanding key %{public}@ because we are not in foreground", op.debugDescription)
continue
if #available(iOS 13.6, *) {
// this was fixed by apple with iOS 13.6 beta 4
// (there is unfortunally no way to negate #available checks)
} else {
if runningInBackground {
// skip publish if we are not in foreground since apple does not allow calles to EN.getDiagnosisKeys in background
logger.log("skipping outstanding key %{public}@ because we are not in foreground", op.debugDescription)
continue
}
}

logger.log("handling outstanding Publish %@", op.debugDescription)
Expand Down

0 comments on commit acd4834

Please sign in to comment.