SignInWithAppleButton not found in scope (SwiftUI 2)

Viewed 1525

I'm implementing Sign In With Apple in a SwiftUI application (iOS 14, SwiftUI 2). I'm importing the AuthenticationServices framework. The app build successfully, and can run on an iOS device or simulator. But I cannot preview the view in the Preview / Canvas (it would be easier to design the view).

Cannot find 'SignInWithAppleButton' in scope

Any idea why? Thanks Axel

PS: Xcode 12 beta 6, macOS Big Sur beta 5

1 Answers

The namespace of SignInWithAppleButton has moved from SwiftUI to AuthenticationServices since beta 6. Just import AuthenticationServices.

Related