Open mvn-toantruong-dn opened 8 months ago
It seems that there are some system API calls in this codebase
In Zip.swift, the creationDate
and modificationDate
API's are called.
#if os(Linux)
// On Linux, setting attributes is not yet really implemented.
// In Swift 4.2, the only settable attribute is `.posixPermissions`.
// See https://github.com/apple/swift-corelibs-foundation/blob/swift-4.2-branch/Foundation/FileManager.swift#L182-L196
directoryAttributes = nil
#else
directoryAttributes = [.creationDate : creationDate, // ⬅️ ⭐️ System API call
.modificationDate : creationDate] // ⬅️ ⭐️ System API call
#endif
Also here:
do {
let fileAttributes = try fileManager.attributesOfItem(atPath: filePath)
if let fileDate = fileAttributes[FileAttributeKey.modificationDate] as? Date { // ⬅️ ⭐️ System API call
let components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: fileDate)
zipInfo.tmz_date.tm_sec = UInt32(components.second!)
zipInfo.tmz_date.tm_min = UInt32(components.minute!)
zipInfo.tmz_date.tm_hour = UInt32(components.hour!)
zipInfo.tmz_date.tm_mday = UInt32(components.day!)
zipInfo.tmz_date.tm_mon = UInt32(components.month!) - 1
zipInfo.tmz_date.tm_year = UInt32(components.year!)
}
if let fileSize = fileAttributes[FileAttributeKey.size] as? Double {
currentPosition += fileSize
}
}
@marmelroy Any Plan for support Apple Privacy Manifest for cocoapods?
Hello, I am an employee of Monstarlab company. I have a question about the Privacy Manifest
At WWDC23 Apple announced that apps and SDKs that make use of certain "required reason" APIs etc will need to provide a privacy manifest. Does Zip need to include this manifest? Please let me know about your upcoming plans to apply the privacy manifest.
Here are some useful references:
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests
https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
https://developer.apple.com/videos/play/wwdc2023/10060/
Thanks