You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AWSCognitoAuthPlugin fails to compile against the visionOS 27 SDK: excludedCredentials (visionOS 1.1) used under @available(visionOS 1.0); no .visionOS platform in Package.swift #4237
AWSCognitoAuthPlugin fails to compile for visionOS when built with the visionOS 27 SDK (Xcode 27).
PlatformWebAuthnCredentials.swift assigns ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.excludedCredentials — which the visionOS SDK annotates @available(visionOS 1.1, *) — inside an extension annotated @available(iOS 17.4, macOS 13.5, visionOS 1.0, *). Because amplify-swift's Package.swift declares no visionOS platform, SwiftPM derives a visionOS 1.0 deployment floor for the package, so the 1.1 API usage is a hard error:
…/AWSCognitoAuthPlugin/Actions/SignIn/WebAuthn/PlatformWebAuthnCredentials.swift:116:28: \
error: 'excludedCredentials' is only available in visionOS 1.1 or newer
This blocks every visionOS app that depends on AWSCognitoAuthPlugin — including apps that never use WebAuthn/passkeys — when building against the visionOS 27 SDK.
Steps to reproduce
A visionOS app target depending on amplify-swiftAWSCognitoAuthPlugin.
Build for the visionOS 27 simulator with Xcode 27 (visionOS 27.0 SDK).
Compilation of the AWSCognitoAuthPlugin target fails in PlatformWebAuthnCredentials.swift at the excludedCredentials assignment.
Root cause
Package.swift → platforms: [.iOS(.v13), .macOS(.v12), .tvOS(.v13), .watchOS(.v9)] — no .visionOS, so the visionOS deployment floor derives to 1.0.
In the visionOS 27 SDK, excludedCredentials is @available(visionOS 1.1, *). With a visionOS 1.0 floor and no if #available guard, this is an error. (Earlier visionOS SDKs evidently annotated this differently / did not enforce it, so it surfaces specifically with the visionOS 27 SDK.)
Suggested fix
Any of:
Guard the usage: wrap the excludedCredentials assignment in if #available(visionOS 1.1, iOS 17.4, *), or
Raise the availability of the enclosing create(with:) / extension to visionOS 1.1, and/or
Declare a visionOS platform in Package.swift so consumers and the package itself get a correct (≥ 1.1) floor.
Consumer workaround (until fixed)
Force the package's visionOS deployment target up at build time — command-line build settings apply to SwiftPM package targets:
xcodebuild … XROS_DEPLOYMENT_TARGET=27.0 build
Environment
Amplify version: 2.51.1 (also present in the latest 2.58.3 — the Package.swift platforms and the unguarded usage are unchanged)
Dependency manager: Swift Package Manager
Xcode: 27.0 (27A5194q), Swift 6.4
SDK / target: visionOS 27.0 (simulator and device), arm64-apple-xros27.0
Hey! I ran into this while working on a visionOS app with the Xcode 27 beta. I'm a professional Apple platforms developer and I've been running the fix from #4250 for a few days now with no issues.
A quick note: As far as I can tell, the suggested if #available(visionOS 1.1, *) approach won't compile against current SDKs. Both the latest Xcode and the Xcode 27 beta mark excludedCredentials as API_UNAVAILABLE(visionos) in the AuthenticationServices headers. Apple seems to have changed the annotation between betas, the "visionOS 1.1 or newer" wording comes from an earlier 27 beta. The #if !os(visionOS) guard builds under both annotation regimes, so that's what the PR does.
I ran the AWSCognitoAuthPlugin unit test suite on iOS 26.1/27.0 and visionOS 26.1/27.0 simulators, and everything passes.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
mattcreaser commentedon Jun 26, 2026
We'll look into a possible fix here.
dawsonamf commentedon Jul 14, 2026
Hey! I ran into this while working on a visionOS app with the Xcode 27 beta. I'm a professional Apple platforms developer and I've been running the fix from #4250 for a few days now with no issues.
A quick note: As far as I can tell, the suggested
if #available(visionOS 1.1, *)approach won't compile against current SDKs. Both the latest Xcode and the Xcode 27 beta markexcludedCredentialsasAPI_UNAVAILABLE(visionos)in the AuthenticationServices headers. Apple seems to have changed the annotation between betas, the "visionOS 1.1 or newer" wording comes from an earlier 27 beta. The#if !os(visionOS)guard builds under both annotation regimes, so that's what the PR does.I ran the AWSCognitoAuthPlugin unit test suite on iOS 26.1/27.0 and visionOS 26.1/27.0 simulators, and everything passes.
fix(auth): fix visionOS build failure in WebAuthn credential registra…
github-actions commentedon Jul 14, 2026
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
harsh62 commentedon Jul 14, 2026
Hey Guys.. I have merged the fix and it will be released soon in the next cycle. Thanks for the contribution and your patience on this.