How I can get iCloud photo file size? Could I use private API like this in prod? Does anyone know another way? (without downloading the file to the device)
func getFileSize(asset: PHAsset) -> Int64? {
let resources = PHAssetResource.assetResources(for: asset)
let resource = resources.first
let size = resource?.value(forKey: "fileSize") as? Int64
return size
}