apple swift: is forKey:fileSize considered accessing non-public API? - Stack Overflow

时间: 2025-01-06 admin 业界

Is object(forKey: "fileSize") considered accessing non-public API?

Has your app been rejected at review stage due to this?

let resources = PHAssetResource.assetResources(for: asset)
if let resource = resources.first {
    if let fileSize = resource.value(forKey: "fileSize") as? Int {
        return fileSize
    }
}