apple_kit

Apple-native services for Radroots iOS and macOS apps
git clone https://radroots.dev/git/apple_kit.git
Log | Files | Refs | README | LICENSE

RadrootsBackgroundTransferTransition.swift (674B)


      1 import Foundation
      2 
      3 extension RadrootsBackgroundTransferSnapshot {
      4     func transitioned(
      5         to state: RadrootsBackgroundTransferState, at date: Date,
      6         failure: RadrootsBackgroundTransferFailure? = nil,
      7         possibleRemoteOrphan: Bool = false
      8     ) throws -> Self {
      9         try Self(
     10             request: request, state: state, progress: progress, failure: failure,
     11             response: state == .completed ? response : nil,
     12             downloadedArtifact: state == .completed ? downloadedArtifact : nil,
     13             possibleRemoteOrphan: possibleRemoteOrphan, updatedAt: date,
     14             executionID: executionID, uploadLease: uploadLease
     15         )
     16     }
     17 }