1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 05:00:10 +00:00

Use a key/string based approach to circument compiling issues

This commit is contained in:
Anders Åberg
2025-04-30 16:27:51 +02:00
parent 9a86bf0e83
commit a1d7db3ad0

View File

@@ -302,8 +302,12 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
// Convert excluded credentials to an array of credential IDs
var excludedCredentialIds: [Data] = []
if #available(macOSApplicationExtension 15.0, *) {
if let excludedCreds = request.excludedCredentials {
excludedCredentialIds = excludedCreds.map { $0.credentialID }
// Use a runtime check approach that doesn't reference the property directly
let key = "excludedCredentials"
if let value = (request as AnyObject).value(forKey: key) {
if let excludedCreds = value as? [ASAuthorizationPlatformPublicKeyCredentialDescriptor] {
excludedCredentialIds = excludedCreds.map { $0.credentialID }
}
}
}