mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: disable macOS-only API on iOS
This commit is contained in:
@ -7,6 +7,7 @@ extension String {
|
|||||||
return self.prefix(maxLength) + trailing
|
return self.prefix(maxLength) + trailing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if canImport(AppKit)
|
||||||
func temporaryFile(_ filename: String = "temp") -> URL {
|
func temporaryFile(_ filename: String = "temp") -> URL {
|
||||||
let url = FileManager.default.temporaryDirectory
|
let url = FileManager.default.temporaryDirectory
|
||||||
.appendingPathComponent(filename)
|
.appendingPathComponent(filename)
|
||||||
@ -15,4 +16,5 @@ extension String {
|
|||||||
try? string.write(to: url, atomically: true, encoding: .utf8)
|
try? string.write(to: url, atomically: true, encoding: .utf8)
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user