taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 0fd9c10887e130e8b5495f852486ca74a5650542
parent 13756a6cd831de391e4ddc08e90db1633ac572bf
Author: Marc Stibane <marc@taler.net>
Date:   Wed,  2 Sep 2026 11:59:55 +0200

tempDirUrl

Diffstat:
MTalerCommon/Helper/URL+id+iban.swift | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/TalerCommon/Helper/URL+id+iban.swift b/TalerCommon/Helper/URL+id+iban.swift @@ -96,6 +96,18 @@ extension URL { return nil } + static var tempDirUrl: URL? { + if #available(iOS 16.4, *) { + return URL.temporaryDirectory + } else { // iOS 15 doesn't have a temp dir + let tmpDirNr: FileManager.SearchPathDirectory = .cachesDirectory + if let cachesDir = FileManager.default.urls(for: tmpDirNr, in: .userDomainMask).first { + return cachesDir + } + } + return nil + } + func path(withSlash: Bool) -> String { let path: String if #available(iOS 16.4, *) {