Files
eqn.ios/Sources/Earthquake Network/Models/Background/BackgroundTaskIdentifiable.swift
T
2023-09-11 15:52:27 +02:00

28 lines
587 B
Swift

//
// BackgroundTaskIdentifiable.swift
// Earthquake Network
//
// Created by Andrea Busi on 11/09/23.
// Copyright © 2023 Earthquake Network. All rights reserved.
//
import Foundation
import BackgroundTasks
protocol BackgroundTaskIdentifiable {
typealias TaskCompletion = (_ success: Bool) -> Void
static var identifier: String { get }
static var interval: TimeInterval { get }
init()
func handle(_ task: BGTask, completion: @escaping TaskCompletion)
func exipration()
}
extension BackgroundTaskIdentifiable {
func exipration() { }
}