Only use the appGroupTemporaryDirectory to access a file from the share extension. (#4002)

… and switch back to the plain `URL.temporaryDirectory` for everything else.

* Fix documentation

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
Doug
2025-04-10 09:56:25 +01:00
committed by GitHub
parent 58a0709a1b
commit 9ba4048462
6 changed files with 99 additions and 27 deletions
+4 -1
View File
@@ -75,7 +75,10 @@ extension URL: @retroactive ExpressibleByStringLiteral {
return url
}
/// The app group temporary directory
/// The app group temporary directory (useful for transferring files between different bundles).
///
/// **Note:** This `tmp` directory doesn't appear to behave as expected as it isn't being tidied up by the system.
/// Make sure to manually tidy up any files you place in here once you've transferred them from one bundle to another.
static var appGroupTemporaryDirectory: URL {
let url = appGroupContainerDirectory
.appendingPathComponent("tmp", isDirectory: true)