27 lines
608 B
Swift
27 lines
608 B
Swift
//
|
|
// AppVersionInterface.swift
|
|
// Zashi
|
|
//
|
|
// Created by Lukáš Korba on 12.11.2022.
|
|
//
|
|
|
|
import ComposableArchitecture
|
|
|
|
extension DependencyValues {
|
|
public var appVersion: AppVersionClient {
|
|
get { self[AppVersionClient.self] }
|
|
set { self[AppVersionClient.self] = newValue }
|
|
}
|
|
}
|
|
|
|
@DependencyClient
|
|
public struct AppVersionClient {
|
|
public let appVersion: () -> String
|
|
public let appBuild: () -> String
|
|
|
|
public init(appVersion: @escaping () -> String, appBuild: @escaping () -> String) {
|
|
self.appVersion = appVersion
|
|
self.appBuild = appBuild
|
|
}
|
|
}
|