update ios project

update ios project
This commit is contained in:
Zeus
2024-07-24 11:51:39 +08:00
parent 876d355b18
commit 1bf69048f3
275 changed files with 3372 additions and 1015 deletions
@@ -0,0 +1,35 @@
//
// URL+Helpers.swift
// PacketTunnel
//
// Created by Jerry Bool on 2022/12/6.
//
import Foundation
extension URL {
var contents: String? {
guard self.isFileURL else {
return nil
}
do {
return try String(contentsOf: self)
}
catch {
Logger.log(error.localizedDescription, to: Logger.vpnLogFile)
return nil
}
}
@discardableResult
func truncate() -> Self {
if isFileURL {
try? "".write(to: self, atomically: true, encoding: .utf8)
}
return self
}
}